|
| 1 | +import { JsonURL } from "../src/JsonURL.js"; |
| 2 | + |
| 3 | +test("aqf implied array e empty", function () { |
| 4 | + expect(JsonURL.parse("e,!e", { AQF: true, impliedArray: [] })).toStrictEqual( |
| 5 | + ["e", ""]) |
| 6 | +}) |
| 7 | +test("aqf implied array empty e", function () { |
| 8 | + expect(JsonURL.parse("!e,e", { AQF: true, impliedArray: [] })).toStrictEqual(["", "e"]); |
| 9 | +}) |
| 10 | +test("aqf explicit array e empty", function () { |
| 11 | + expect(JsonURL.parse("(e,!e)", { AQF: true })).toStrictEqual( |
| 12 | + ["e", ""]); |
| 13 | +}) |
| 14 | + |
| 15 | +test("aqf implied dict e:empty", function () { |
| 16 | + expect(JsonURL.parse("e:!e", { AQF: true, impliedObject: {} })).toStrictEqual( |
| 17 | + { "e": "" }); |
| 18 | +}) |
| 19 | +test("aqf explicit dict e:empty", function () { |
| 20 | + expect(JsonURL.parse("(e:!e)", { AQF: true })).toStrictEqual( |
| 21 | + { "e": "" }); |
| 22 | +}) |
| 23 | +test("aqf implied dict empty:e", function () { |
| 24 | + expect(JsonURL.parse("!e:e", { AQF: true, impliedObject: {} })).toStrictEqual( |
| 25 | + { "": "e" }) |
| 26 | +}) |
| 27 | +test("aqf implied dict e:empty a:b", function () { |
| 28 | + expect(JsonURL.parse("e:!e,a:b", { AQF: true, impliedObject: {} })).toStrictEqual( |
| 29 | + { "e": "", "a": "b" }); |
| 30 | +}) |
0 commit comments