FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

incorrect result when $map($, $append(?)) · Issue #86 · dashjoin/jsonata-java · GitHub

incorrect result when $map($, $append(?)) #86

Description

write to simpe test close to my code

  @Test
  public void testTransform() throws IOException {
    Object answer = Json.parseJson("{\"systems\": \"asd2\"}");
    var expression = Jsonata.jsonata("{'systems': 'asd2'}.$map($, $append(?))");
    Object evaluate = expression.evaluate(null);
    Assertions.assertEquals(answer, evaluate);
  }

  @Test
  public void testTransform2() {
    Object answer = Json.parseJson("{\"systems\": \"asd\"}");
    var expression = Jsonata.jsonata("$map($, $append(?))");
    Object evaluate = expression.evaluate(answer);
    Assertions.assertEquals(answer, evaluate);
  }

both failed with error

org.opentest4j.AssertionFailedError: 
Expected :{systems=asd2}
Actual   :[{systems=asd2}, 0]
org.opentest4j.AssertionFailedError: 
Expected :{systems=asd}
Actual   :[{systems=asd}, 0]

https://try.jsonata.org/ return result
first test

second test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL