From e88986a5a34a872894f62be7ef581a556786221f Mon Sep 17 00:00:00 2001 From: James Prior Date: Fri, 1 Mar 2024 08:26:27 +0000 Subject: [PATCH 1/8] Add some nondeterminism to object iteration. --- .gitmodules | 4 +++ src/path/environment.ts | 23 +++++++++++++++++ src/path/selectors.ts | 14 +++++----- tests/path/cts_nondeterministic | 1 + tests/path/cts_nondeterministic.test.ts | 34 +++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 6 deletions(-) create mode 160000 tests/path/cts_nondeterministic create mode 100644 tests/path/cts_nondeterministic.test.ts diff --git a/.gitmodules b/.gitmodules index 8e57e94..3301d80 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ [submodule "tests/path/cts"] path = tests/path/cts url = https://github.com/jsonpath-standard/jsonpath-compliance-test-suite.git +[submodule "tests/path/cts_nondeterministic"] + path = tests/path/cts_nondeterministic + url = git@github.com:glyn/jsonpath-compliance-test-suite.git + branch = nondeterminism diff --git a/src/path/environment.ts b/src/path/environment.ts index 4136825..767295e 100644 --- a/src/path/environment.ts +++ b/src/path/environment.ts @@ -262,4 +262,27 @@ export class JSONPathEnvironment { return args; } + + /** + * Return an array of key/values of the enumerable properties in _obj_. + * + * If you want to introduce some nondeterminism to iterating JSON-like + * objects, do it here. The wildcard selector, descendent segment and + * filter selector all use `this.environment.entries`. + * + * @param obj - A JSON-like object. + */ + public entries(obj: { + [key: string]: JSONValue; + }): Array<[string, JSONValue]> { + function shuffle(entries: Array<[string, JSONValue]>) { + for (let i = entries.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [entries[i], entries[j]] = [entries[j], entries[i]]; + } + return entries; + } + + return shuffle(Object.entries(obj)); + } } diff --git a/src/path/selectors.ts b/src/path/selectors.ts index b26bd06..338e9ef 100644 --- a/src/path/selectors.ts +++ b/src/path/selectors.ts @@ -278,7 +278,7 @@ export class WildcardSelector extends JSONPathSelector { ); } } else if (isObject(node.value)) { - for (const [key, value] of Object.entries(node.value)) { + for (const [key, value] of this.environment.entries(node.value)) { rv.push( new JSONPathNode(value, node.location.concat(key), node.root), ); @@ -300,7 +300,7 @@ export class WildcardSelector extends JSONPathSelector { ); } } else if (isObject(node.value)) { - for (const [key, value] of Object.entries(node.value)) { + for (const [key, value] of this.environment.entries(node.value)) { yield new JSONPathNode(value, node.location.concat(key), node.root); } } @@ -377,7 +377,9 @@ export class RecursiveDescentSegment extends JSONPathSelector { } } } else if (isObject(currentNode.value)) { - for (const [key, value] of Object.entries(currentNode.value)) { + for (const [key, value] of this.environment.entries( + currentNode.value, + )) { const __node = new JSONPathNode( value, currentNode.location.concat(key), @@ -421,7 +423,7 @@ export class RecursiveDescentSegment extends JSONPathSelector { } } } else if (isObject(node.value)) { - for (const [key, value] of Object.entries(node.value)) { + for (const [key, value] of this.environment.entries(node.value)) { const _node = new JSONPathNode( value, node.location.concat(key), @@ -467,7 +469,7 @@ export class FilterSelector extends JSONPathSelector { } } } else if (isObject(node.value)) { - for (const [key, value] of Object.entries(node.value)) { + for (const [key, value] of this.environment.entries(node.value)) { const filterContext: FilterContext = { environment: this.environment, currentValue: value, @@ -502,7 +504,7 @@ export class FilterSelector extends JSONPathSelector { } } } else if (isObject(node.value)) { - for (const [key, value] of Object.entries(node.value)) { + for (const [key, value] of this.environment.entries(node.value)) { const filterContext: FilterContext = { environment: this.environment, currentValue: value, diff --git a/tests/path/cts_nondeterministic b/tests/path/cts_nondeterministic new file mode 160000 index 0000000..8523282 --- /dev/null +++ b/tests/path/cts_nondeterministic @@ -0,0 +1 @@ +Subproject commit 8523282c8eda9678543c50729289323b46385aae diff --git a/tests/path/cts_nondeterministic.test.ts b/tests/path/cts_nondeterministic.test.ts new file mode 100644 index 0000000..733b99d --- /dev/null +++ b/tests/path/cts_nondeterministic.test.ts @@ -0,0 +1,34 @@ +import { JSONPathEnvironment } from "../../src/path/environment"; +import { JSONPathError } from "../../src/path/errors"; +import { JSONValue } from "../../src/types"; + +import ctsNondeterministic from "./cts_nondeterministic/cts.json"; + +type Case = { + name: string; + selector: string; + document?: JSONValue; + result?: JSONValue[]; + results?: JSONValue[][]; + invalid_selector?: boolean; +}; + +describe("nondeterministic compliance test suite", () => { + test.each(ctsNondeterministic.tests)( + "$name", + ({ selector, document, result, results, invalid_selector }: Case) => { + const env = new JSONPathEnvironment(); + if (invalid_selector) { + expect(() => env.compile(selector)).toThrow(JSONPathError); + } else if (document) { + if (result) { + const rv = env.query(selector, document).values(); + expect(rv).toStrictEqual(result); + } else if (results) { + const rv = env.query(selector, document).values(); + expect(results).toContainEqual(rv); + } + } + }, + ); +}); From 7053150bbfbbfadb27d3deb0815d17f3f55b0adb Mon Sep 17 00:00:00 2001 From: James Prior Date: Fri, 1 Mar 2024 08:30:15 +0000 Subject: [PATCH 2/8] Don't lint submodule --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index 56cedef..4397177 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,4 +5,5 @@ benchmark tests/browser docs tests/path/cts +tests/path/cts_nondeterministic performance/index.js \ No newline at end of file From be13771eaff6b836cd0f9c94d59964c0624a655c Mon Sep 17 00:00:00 2001 From: James Prior Date: Sat, 2 Mar 2024 07:27:58 +0000 Subject: [PATCH 3/8] Update submodules and CTS main test runner. --- .gitmodules | 4 ++-- tests/path/cts | 2 +- tests/path/cts_nondeterministic | 2 +- tests/path/query.test.ts | 30 +++++++++++++++++++++--------- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3301d80..7f4b9fb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,5 +3,5 @@ url = https://github.com/jsonpath-standard/jsonpath-compliance-test-suite.git [submodule "tests/path/cts_nondeterministic"] path = tests/path/cts_nondeterministic - url = git@github.com:glyn/jsonpath-compliance-test-suite.git - branch = nondeterminism + url = git@github.com:jsonpath-standard/jsonpath-compliance-test-suite.git + branch = more-non-determinism \ No newline at end of file diff --git a/tests/path/cts b/tests/path/cts index 446336c..8362431 160000 --- a/tests/path/cts +++ b/tests/path/cts @@ -1 +1 @@ -Subproject commit 446336cd6651586f416a3b546c70bdd0fa2022c0 +Subproject commit 8362431e394c77bf0b9dec9d7e0b2ea062c83cbd diff --git a/tests/path/cts_nondeterministic b/tests/path/cts_nondeterministic index 8523282..fd9baaa 160000 --- a/tests/path/cts_nondeterministic +++ b/tests/path/cts_nondeterministic @@ -1 +1 @@ -Subproject commit 8523282c8eda9678543c50729289323b46385aae +Subproject commit fd9baaac23f97fa8ba7a8baae01bccb1aad0cef4 diff --git a/tests/path/query.test.ts b/tests/path/query.test.ts index 1ea7b84..2cfa98b 100644 --- a/tests/path/query.test.ts +++ b/tests/path/query.test.ts @@ -10,19 +10,25 @@ type Case = { selector: string; document?: JSONValue; result?: JSONValue[]; + results?: JSONValue[][]; invalid_selector?: boolean; }; describe("compliance test suite", () => { test.each(cts.tests)( "$name", - ({ selector, document, result, invalid_selector }: Case) => { + ({ selector, document, result, results, invalid_selector }: Case) => { const env = new JSONPathEnvironment(); if (invalid_selector) { expect(() => env.compile(selector)).toThrow(JSONPathError); - } else if (document && result) { - const rv = env.query(selector, document).values(); - expect(rv).toStrictEqual(result); + } else if (document) { + if (result) { + const rv = env.query(selector, document).values(); + expect(rv).toStrictEqual(result); + } else if (results) { + const rv = env.query(selector, document).values(); + expect(results).toContainEqual(rv); + } } }, ); @@ -31,14 +37,20 @@ describe("compliance test suite", () => { describe("lazy resolution", () => { test.each(cts.tests)( "$name", - ({ selector, document, result, invalid_selector }: Case) => { + ({ selector, document, result, results, invalid_selector }: Case) => { const env = new JSONPathEnvironment(); if (invalid_selector) { expect(() => env.compile(selector)).toThrow(JSONPathError); - } else if (document && result) { - const it = env.lazyQuery(selector, document); - const rv = new JSONPathNodeList(Array.from(it)).values(); - expect(rv).toStrictEqual(result); + } else if (document) { + if (result) { + const it = env.lazyQuery(selector, document); + const rv = new JSONPathNodeList(Array.from(it)).values(); + expect(rv).toStrictEqual(result); + } else if (results) { + const it = env.lazyQuery(selector, document); + const rv = new JSONPathNodeList(Array.from(it)).values(); + expect(results).toContainEqual(rv); + } } }, ); From 4967cfae56197a245a780cb69fa7f138b066d786 Mon Sep 17 00:00:00 2001 From: James Prior Date: Mon, 4 Mar 2024 17:51:55 +0000 Subject: [PATCH 4/8] Use env vars to set CTS path and nondeterminism --- .eslintignore | 1 - .gitmodules | 4 ---- README.md | 9 +++++++++ src/path/environment.ts | 17 +++++++++++++++- ...terministic.test.ts => compliance.test.ts} | 19 +++++++++++++----- tests/path/cts | 2 +- tests/path/cts_nondeterministic | 1 - tests/path/{query.test.ts => lazy.test.ts} | 20 ------------------- tsconfig.json | 2 +- 9 files changed, 41 insertions(+), 34 deletions(-) rename tests/path/{cts_nondeterministic.test.ts => compliance.test.ts} (70%) delete mode 160000 tests/path/cts_nondeterministic rename tests/path/{query.test.ts => lazy.test.ts} (64%) diff --git a/.eslintignore b/.eslintignore index 4397177..56cedef 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,5 +5,4 @@ benchmark tests/browser docs tests/path/cts -tests/path/cts_nondeterministic performance/index.js \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 7f4b9fb..8e57e94 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ [submodule "tests/path/cts"] path = tests/path/cts url = https://github.com/jsonpath-standard/jsonpath-compliance-test-suite.git -[submodule "tests/path/cts_nondeterministic"] - path = tests/path/cts_nondeterministic - url = git@github.com:jsonpath-standard/jsonpath-compliance-test-suite.git - branch = more-non-determinism \ No newline at end of file diff --git a/README.md b/README.md index b3b2668..841a727 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,15 @@ JSON P3 has zero runtime dependencies. | `json-p3-iife.js` | A bundle formatted as an Immediately Invoked Function Expression. | | `json-p3-iife.min.js` | A minified bundle formatted as an Immediately Invoked Function Expression. | +## Compliance Environment Variables + +These environment variables control the location of the compliance test suite under test and if nondeterministic object iteration is enabled for those tests. + +| Environment Variable | Description | +| ------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `JSONP3_CTS` | The path to `cts.json` used by `compliance.test.ts`. Defaults to `tests/path/cts/cts.json`. | +| `JSONP3_NONDETERMINISTIC` | When set to `true`, enables nondeterministic iteration of JSON objects for `compliance.test.ts`. Defaults to `false`. | + ## Contributing Please see [Contributing to JSON P3](https://github.com/jg-rp/json-p3/blob/main/CONTRIBUTING.md) diff --git a/src/path/environment.ts b/src/path/environment.ts index 767295e..4a55955 100644 --- a/src/path/environment.ts +++ b/src/path/environment.ts @@ -51,6 +51,11 @@ export type JSONPathEnvironmentOptions = { * can visit before a `JSONPathRecursionLimitError` is thrown. */ maxRecursionDepth?: number; + + /** + * If `true`, enable nondeterministic ordering when iterating JSON object data. + */ + nondeterministic?: boolean; }; /** @@ -88,6 +93,11 @@ export class JSONPathEnvironment { */ readonly maxRecursionDepth: number; + /** + * If `true`, enable nondeterministic ordering when iterating JSON object data. + */ + readonly nondeterministic: boolean; + /** * A map of function names to objects implementing the {@link FilterFunction} * interface. You are free to set or delete custom filter functions directly. @@ -104,6 +114,7 @@ export class JSONPathEnvironment { this.maxIntIndex = options.maxIntIndex ?? Math.pow(2, 53) - 1; this.minIntIndex = options.maxIntIndex ?? -Math.pow(2, 53) - 1; this.maxRecursionDepth = options.maxRecursionDepth ?? 50; + this.nondeterministic = options.nondeterministic ?? false; this.parser = new Parser(this); this.setupFilterFunctions(); } @@ -283,6 +294,10 @@ export class JSONPathEnvironment { return entries; } - return shuffle(Object.entries(obj)); + if (this.nondeterministic) { + return shuffle(Object.entries(obj)); + } + + return Object.entries(obj); } } diff --git a/tests/path/cts_nondeterministic.test.ts b/tests/path/compliance.test.ts similarity index 70% rename from tests/path/cts_nondeterministic.test.ts rename to tests/path/compliance.test.ts index 733b99d..3f03172 100644 --- a/tests/path/cts_nondeterministic.test.ts +++ b/tests/path/compliance.test.ts @@ -1,9 +1,9 @@ +import { readFileSync } from "fs"; + import { JSONPathEnvironment } from "../../src/path/environment"; import { JSONPathError } from "../../src/path/errors"; import { JSONValue } from "../../src/types"; -import ctsNondeterministic from "./cts_nondeterministic/cts.json"; - type Case = { name: string; selector: string; @@ -13,11 +13,20 @@ type Case = { invalid_selector?: boolean; }; -describe("nondeterministic compliance test suite", () => { - test.each(ctsNondeterministic.tests)( +const cts = JSON.parse( + readFileSync(process.env.JSONP3_CTS || "tests/path/cts/cts.json", { + encoding: "utf8", + }), +); + +const env = new JSONPathEnvironment({ + nondeterministic: process.env.JSONP3_NONDETERMINISTIC === "true", +}); + +describe("compliance test suite", () => { + test.each(cts.tests)( "$name", ({ selector, document, result, results, invalid_selector }: Case) => { - const env = new JSONPathEnvironment(); if (invalid_selector) { expect(() => env.compile(selector)).toThrow(JSONPathError); } else if (document) { diff --git a/tests/path/cts b/tests/path/cts index 8362431..c6261e1 160000 --- a/tests/path/cts +++ b/tests/path/cts @@ -1 +1 @@ -Subproject commit 8362431e394c77bf0b9dec9d7e0b2ea062c83cbd +Subproject commit c6261e15635321c728b2b7ba4a822f73b2698b7a diff --git a/tests/path/cts_nondeterministic b/tests/path/cts_nondeterministic deleted file mode 160000 index fd9baaa..0000000 --- a/tests/path/cts_nondeterministic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd9baaac23f97fa8ba7a8baae01bccb1aad0cef4 diff --git a/tests/path/query.test.ts b/tests/path/lazy.test.ts similarity index 64% rename from tests/path/query.test.ts rename to tests/path/lazy.test.ts index 2cfa98b..dc36222 100644 --- a/tests/path/query.test.ts +++ b/tests/path/lazy.test.ts @@ -14,26 +14,6 @@ type Case = { invalid_selector?: boolean; }; -describe("compliance test suite", () => { - test.each(cts.tests)( - "$name", - ({ selector, document, result, results, invalid_selector }: Case) => { - const env = new JSONPathEnvironment(); - if (invalid_selector) { - expect(() => env.compile(selector)).toThrow(JSONPathError); - } else if (document) { - if (result) { - const rv = env.query(selector, document).values(); - expect(rv).toStrictEqual(result); - } else if (results) { - const rv = env.query(selector, document).values(); - expect(results).toContainEqual(rv); - } - } - }, - ); -}); - describe("lazy resolution", () => { test.each(cts.tests)( "$name", diff --git a/tsconfig.json b/tsconfig.json index 125ba0f..44ba1dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ "strict": true, "target": "es2022", "noImplicitAny": true, - "types": ["jest"], + "types": ["jest", "node"], "incremental": true, "importHelpers": true, "isolatedModules": true, From 3209042f079d871c0af04134680034ab1489ec78 Mon Sep 17 00:00:00 2001 From: James Prior Date: Tue, 5 Mar 2024 13:53:32 +0000 Subject: [PATCH 5/8] Change `JSONP3_NONDETERMINISTIC` to `JSONP3_CTS_NONDETERMINISTIC` --- CHANGELOG.md | 6 ++++++ README.md | 8 ++++---- package-lock.json | 4 ++-- performance/index.js | 2 +- tests/path/compliance.test.ts | 2 +- tests/path/cts | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d463b3c..af27819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # JSON P3 Change Log +# Version 1.1.0 (unreleased) + +**Features** + +- Added `nondeterministic` to `JSONPathEnvironmentOptions` and environment variables to control nondeterminism and the location of `cts.json` when testing for compliance. See the [README](https://github.com/jg-rp/json-p3/blob/main/README.md) for a description of these environment variables. + # Version 1.0.0 [RFC 9535](https://datatracker.ietf.org/doc/html/rfc9535) has been published, replacing the [draft IETF JSONPath base](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-21). diff --git a/README.md b/README.md index 841a727..b09140f 100644 --- a/README.md +++ b/README.md @@ -65,10 +65,10 @@ JSON P3 has zero runtime dependencies. These environment variables control the location of the compliance test suite under test and if nondeterministic object iteration is enabled for those tests. -| Environment Variable | Description | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `JSONP3_CTS` | The path to `cts.json` used by `compliance.test.ts`. Defaults to `tests/path/cts/cts.json`. | -| `JSONP3_NONDETERMINISTIC` | When set to `true`, enables nondeterministic iteration of JSON objects for `compliance.test.ts`. Defaults to `false`. | +| Environment Variable | Description | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `JSONP3_CTS` | The path to `cts.json` used by `compliance.test.ts`. Defaults to `tests/path/cts/cts.json`. | +| `JSONP3_CTS_NONDETERMINISTIC` | When set to `true`, enables nondeterministic iteration of JSON objects for `compliance.test.ts`. Defaults to `false`. | ## Contributing diff --git a/package-lock.json b/package-lock.json index 43e51fc..6443601 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "json-p3", - "version": "0.3.1", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "json-p3", - "version": "0.3.1", + "version": "1.0.0", "license": "MIT", "devDependencies": { "@babel/cli": "^7.23.4", diff --git a/performance/index.js b/performance/index.js index bce9486..71488f6 100644 --- a/performance/index.js +++ b/performance/index.js @@ -30,4 +30,4 @@ function perf(repeat) { return (stop - start) / 1e3; } -console.log(perf(1000)); +console.log(perf(10000)); diff --git a/tests/path/compliance.test.ts b/tests/path/compliance.test.ts index 3f03172..f91bb2e 100644 --- a/tests/path/compliance.test.ts +++ b/tests/path/compliance.test.ts @@ -20,7 +20,7 @@ const cts = JSON.parse( ); const env = new JSONPathEnvironment({ - nondeterministic: process.env.JSONP3_NONDETERMINISTIC === "true", + nondeterministic: process.env.JSONP3_CTS_NONDETERMINISTIC === "true", }); describe("compliance test suite", () => { diff --git a/tests/path/cts b/tests/path/cts index c6261e1..c1c6b88 160000 --- a/tests/path/cts +++ b/tests/path/cts @@ -1 +1 @@ -Subproject commit c6261e15635321c728b2b7ba4a822f73b2698b7a +Subproject commit c1c6b88b25a7895b227383e22891a5f52fb70508 From 89d9ad4258c784b3ce3db97cb34a9a0e4f627070 Mon Sep 17 00:00:00 2001 From: James Prior Date: Tue, 5 Mar 2024 14:00:37 +0000 Subject: [PATCH 6/8] Change `JSONP3_CTS` to `JSONP3_CTS_PATH` --- README.md | 2 +- tests/path/compliance.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b09140f..b54be72 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ These environment variables control the location of the compliance test suite un | Environment Variable | Description | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `JSONP3_CTS` | The path to `cts.json` used by `compliance.test.ts`. Defaults to `tests/path/cts/cts.json`. | +| `JSONP3_CTS_PATH` | The path to `cts.json` used by `compliance.test.ts`. Defaults to `tests/path/cts/cts.json`. | | `JSONP3_CTS_NONDETERMINISTIC` | When set to `true`, enables nondeterministic iteration of JSON objects for `compliance.test.ts`. Defaults to `false`. | ## Contributing diff --git a/tests/path/compliance.test.ts b/tests/path/compliance.test.ts index f91bb2e..19e294b 100644 --- a/tests/path/compliance.test.ts +++ b/tests/path/compliance.test.ts @@ -14,7 +14,7 @@ type Case = { }; const cts = JSON.parse( - readFileSync(process.env.JSONP3_CTS || "tests/path/cts/cts.json", { + readFileSync(process.env.JSONP3_CTS_PATH || "tests/path/cts/cts.json", { encoding: "utf8", }), ); From ec942474fd562c19b83b88d2434644baf96e28b1 Mon Sep 17 00:00:00 2001 From: James Prior Date: Tue, 5 Mar 2024 14:06:03 +0000 Subject: [PATCH 7/8] Indicate nondeterminism in output when enabled --- tests/path/compliance.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/path/compliance.test.ts b/tests/path/compliance.test.ts index 19e294b..20a3dd4 100644 --- a/tests/path/compliance.test.ts +++ b/tests/path/compliance.test.ts @@ -23,7 +23,9 @@ const env = new JSONPathEnvironment({ nondeterministic: process.env.JSONP3_CTS_NONDETERMINISTIC === "true", }); -describe("compliance test suite", () => { +const testSuiteName = env.nondeterministic ? "compliance test suite (nondeterministic)" : "compliance test suite"; + +describe(testSuiteName, () => { test.each(cts.tests)( "$name", ({ selector, document, result, results, invalid_selector }: Case) => { From 05b3469c34678fccd5aa02c856c82302a8edcf64 Mon Sep 17 00:00:00 2001 From: James Prior Date: Tue, 5 Mar 2024 14:17:25 +0000 Subject: [PATCH 8/8] Fix lint issue --- tests/path/compliance.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/path/compliance.test.ts b/tests/path/compliance.test.ts index 20a3dd4..07cb304 100644 --- a/tests/path/compliance.test.ts +++ b/tests/path/compliance.test.ts @@ -23,7 +23,9 @@ const env = new JSONPathEnvironment({ nondeterministic: process.env.JSONP3_CTS_NONDETERMINISTIC === "true", }); -const testSuiteName = env.nondeterministic ? "compliance test suite (nondeterministic)" : "compliance test suite"; +const testSuiteName = env.nondeterministic + ? "compliance test suite (nondeterministic)" + : "compliance test suite"; describe(testSuiteName, () => { test.each(cts.tests)(