@fluid-experimental/property-changeset 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ajvFactory.cjs +19 -0
- package/dist/ajvFactory.cjs.map +1 -0
- package/dist/ajvFactory.d.cts +7 -0
- package/dist/ajvFactory.d.cts.map +1 -0
- package/dist/changeset.d.ts +3 -6
- package/dist/changeset.d.ts.map +1 -1
- package/dist/changeset.js +75 -75
- package/dist/changeset.js.map +1 -1
- package/dist/changeset_operations/array.d.ts +6 -2
- package/dist/changeset_operations/array.d.ts.map +1 -1
- package/dist/changeset_operations/array.js +94 -96
- package/dist/changeset_operations/array.js.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.d.ts +2 -5
- package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
- package/dist/changeset_operations/arrayChangesetIterator.js +11 -12
- package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
- package/dist/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
- package/dist/changeset_operations/changesetConflictTypes.js +2 -2
- package/dist/changeset_operations/changesetConflictTypes.js.map +1 -1
- package/dist/changeset_operations/indexedCollection.d.ts +1 -4
- package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/dist/changeset_operations/indexedCollection.js +48 -49
- package/dist/changeset_operations/indexedCollection.js.map +1 -1
- package/dist/changeset_operations/isEmptyChangeset.d.ts +1 -4
- package/dist/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
- package/dist/changeset_operations/isEmptyChangeset.js +9 -9
- package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
- package/dist/helpers/typeidHelper.d.ts +0 -3
- package/dist/helpers/typeidHelper.d.ts.map +1 -1
- package/dist/helpers/typeidHelper.js +10 -10
- package/dist/helpers/typeidHelper.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/dist/isReservedKeyword.d.ts.map +1 -1
- package/dist/isReservedKeyword.js +2 -2
- package/dist/isReservedKeyword.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/pathHelper.d.ts +0 -3
- package/dist/pathHelper.d.ts.map +1 -1
- package/dist/pathHelper.js +2 -2
- package/dist/pathHelper.js.map +1 -1
- package/dist/rebase.js +8 -8
- package/dist/rebase.js.map +1 -1
- package/dist/templateSchema.d.ts.map +1 -1
- package/dist/templateSchema.js +2 -2
- package/dist/templateSchema.js.map +1 -1
- package/dist/templateValidator.d.ts +1 -1
- package/dist/templateValidator.d.ts.map +1 -1
- package/dist/templateValidator.js +49 -54
- package/dist/templateValidator.js.map +1 -1
- package/dist/test/array.spec.js +34 -36
- package/dist/test/array.spec.js.map +1 -1
- package/dist/test/indexedCollection.spec.js +9 -6
- package/dist/test/indexedCollection.spec.js.map +1 -1
- package/dist/test/map.spec.js +4 -4
- package/dist/test/map.spec.js.map +1 -1
- package/dist/test/pathHelper.spec.js +185 -185
- package/dist/test/pathHelper.spec.js.map +1 -1
- package/dist/test/reversibleCs.spec.js +5 -5
- package/dist/test/reversibleCs.spec.js.map +1 -1
- package/dist/test/schemaValidator.js +12 -11
- package/dist/test/schemaValidator.js.map +1 -1
- package/dist/test/schemas/badBothPropertiesAndTypeid.js +18 -18
- package/dist/test/schemas/badBothPropertiesAndTypeid.js.map +1 -1
- package/dist/test/schemas/badInvalidSemverInTypeid.js +40 -40
- package/dist/test/schemas/badInvalidSemverInTypeid.js.map +1 -1
- package/dist/test/schemas/badMissingSemverInTypeid.js +40 -40
- package/dist/test/schemas/badMissingSemverInTypeid.js.map +1 -1
- package/dist/test/schemas/badNestedProperties.js +40 -40
- package/dist/test/schemas/badNestedProperties.js.map +1 -1
- package/dist/test/schemas/badPrimitiveTypeid.js +25 -25
- package/dist/test/schemas/badPrimitiveTypeid.js.map +1 -1
- package/dist/test/schemas/badVersionedTypeid.js +41 -41
- package/dist/test/schemas/badVersionedTypeid.js.map +1 -1
- package/dist/test/schemas/goodColorPalette.js +15 -15
- package/dist/test/schemas/goodColorPalette.js.map +1 -1
- package/dist/test/schemas/goodDraftAsVersion.js +12 -12
- package/dist/test/schemas/goodDraftAsVersion.js.map +1 -1
- package/dist/test/schemas/goodPointId.js +40 -40
- package/dist/test/schemas/goodPointId.js.map +1 -1
- package/dist/test/schemas/goodReferenceAndRegular.js +16 -16
- package/dist/test/schemas/goodReferenceAndRegular.js.map +1 -1
- package/dist/test/schemas/goodReservedTypes.js +22 -22
- package/dist/test/schemas/goodReservedTypes.js.map +1 -1
- package/dist/test/schemas/goodUIBorder.js +34 -34
- package/dist/test/schemas/goodUIBorder.js.map +1 -1
- package/dist/test/schemas/index.js +55 -0
- package/dist/test/schemas/index.js.map +1 -0
- package/dist/test/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/test/validator/templateSyntax.spec.js +20 -25
- package/dist/test/validator/templateSyntax.spec.js.map +1 -1
- package/dist/test/validator/templateValidator.spec.js +118 -89
- package/dist/test/validator/templateValidator.spec.js.map +1 -1
- package/dist/test/validator/typeidHelper.spec.js +42 -41
- package/dist/test/validator/typeidHelper.spec.js.map +1 -1
- package/dist/utils.d.ts +17 -13
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +79 -79
- package/dist/utils.js.map +1 -1
- package/dist/validationResultBuilder.d.ts +2 -1
- package/dist/validationResultBuilder.d.ts.map +1 -1
- package/dist/validationResultBuilder.js.map +1 -1
- package/lib/ajvFactory.cjs +19 -0
- package/lib/ajvFactory.cjs.map +1 -0
- package/lib/ajvFactory.d.cts +7 -0
- package/lib/ajvFactory.d.cts.map +1 -0
- package/lib/changeset.d.ts +3 -6
- package/lib/changeset.d.ts.map +1 -1
- package/lib/changeset.js +16 -16
- package/lib/changeset.js.map +1 -1
- package/lib/changeset_operations/array.d.ts +6 -2
- package/lib/changeset_operations/array.d.ts.map +1 -1
- package/lib/changeset_operations/array.js +7 -9
- package/lib/changeset_operations/array.js.map +1 -1
- package/lib/changeset_operations/arrayChangesetIterator.d.ts +2 -5
- package/lib/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
- package/lib/changeset_operations/arrayChangesetIterator.js +3 -4
- package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
- package/lib/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
- package/lib/changeset_operations/changesetConflictTypes.js.map +1 -1
- package/lib/changeset_operations/indexedCollection.d.ts +1 -4
- package/lib/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/lib/changeset_operations/indexedCollection.js +10 -11
- package/lib/changeset_operations/indexedCollection.js.map +1 -1
- package/lib/changeset_operations/isEmptyChangeset.d.ts +1 -4
- package/lib/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
- package/lib/changeset_operations/isEmptyChangeset.js +3 -3
- package/lib/changeset_operations/isEmptyChangeset.js.map +1 -1
- package/lib/helpers/typeidHelper.d.ts +0 -3
- package/lib/helpers/typeidHelper.d.ts.map +1 -1
- package/lib/helpers/typeidHelper.js +1 -1
- package/lib/helpers/typeidHelper.js.map +1 -1
- package/lib/index.d.ts +8 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -8
- package/lib/index.js.map +1 -1
- package/lib/isReservedKeyword.d.ts.map +1 -1
- package/lib/isReservedKeyword.js.map +1 -1
- package/lib/pathHelper.d.ts +0 -3
- package/lib/pathHelper.d.ts.map +1 -1
- package/lib/pathHelper.js.map +1 -1
- package/lib/rebase.js +2 -2
- package/lib/rebase.js.map +1 -1
- package/lib/templateSchema.d.ts.map +1 -1
- package/lib/templateSchema.js.map +1 -1
- package/lib/templateValidator.d.ts +1 -1
- package/lib/templateValidator.d.ts.map +1 -1
- package/lib/templateValidator.js +24 -29
- package/lib/templateValidator.js.map +1 -1
- package/lib/test/array.spec.js +768 -0
- package/lib/test/array.spec.js.map +1 -0
- package/lib/test/indexedCollection.spec.js +75 -0
- package/lib/test/indexedCollection.spec.js.map +1 -0
- package/lib/test/map.spec.js +17 -0
- package/lib/test/map.spec.js.map +1 -0
- package/lib/test/pathHelper.spec.js +435 -0
- package/lib/test/pathHelper.spec.js.map +1 -0
- package/lib/test/reversibleCs.spec.js +42 -0
- package/lib/test/reversibleCs.spec.js.map +1 -0
- package/lib/test/schemaValidator.js +103 -0
- package/lib/test/schemaValidator.js.map +1 -0
- package/lib/test/schemas/badBothPropertiesAndTypeid.js +24 -0
- package/lib/test/schemas/badBothPropertiesAndTypeid.js.map +1 -0
- package/lib/test/schemas/badInvalidSemverInTypeid.js +46 -0
- package/lib/test/schemas/badInvalidSemverInTypeid.js.map +1 -0
- package/lib/test/schemas/badMissingSemverInTypeid.js +46 -0
- package/lib/test/schemas/badMissingSemverInTypeid.js.map +1 -0
- package/lib/test/schemas/badNestedProperties.js +46 -0
- package/lib/test/schemas/badNestedProperties.js.map +1 -0
- package/lib/test/schemas/badPrimitiveTypeid.js +31 -0
- package/lib/test/schemas/badPrimitiveTypeid.js.map +1 -0
- package/lib/test/schemas/badVersionedTypeid.js +47 -0
- package/lib/test/schemas/badVersionedTypeid.js.map +1 -0
- package/lib/test/schemas/goodColorPalette.js +21 -0
- package/lib/test/schemas/goodColorPalette.js.map +1 -0
- package/lib/test/schemas/goodDraftAsVersion.js +18 -0
- package/lib/test/schemas/goodDraftAsVersion.js.map +1 -0
- package/lib/test/schemas/goodPointId.js +46 -0
- package/lib/test/schemas/goodPointId.js.map +1 -0
- package/lib/test/schemas/goodReferenceAndRegular.js +22 -0
- package/lib/test/schemas/goodReferenceAndRegular.js.map +1 -0
- package/lib/test/schemas/goodReservedTypes.js +29 -0
- package/lib/test/schemas/goodReservedTypes.js.map +1 -0
- package/lib/test/schemas/goodUIBorder.js +41 -0
- package/lib/test/schemas/goodUIBorder.js.map +1 -0
- package/lib/test/schemas/index.js +29 -0
- package/lib/test/schemas/index.js.map +1 -0
- package/lib/test/tsconfig.tsbuildinfo +1 -0
- package/lib/test/validator/templateSyntax.spec.js +83 -0
- package/lib/test/validator/templateSyntax.spec.js.map +1 -0
- package/lib/test/validator/templateValidator.spec.js +1022 -0
- package/lib/test/validator/templateValidator.spec.js.map +1 -0
- package/lib/test/validator/typeidHelper.spec.js +142 -0
- package/lib/test/validator/typeidHelper.spec.js.map +1 -0
- package/lib/utils.d.ts +17 -13
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +23 -23
- package/lib/utils.js.map +1 -1
- package/lib/validationResultBuilder.d.ts +2 -1
- package/lib/validationResultBuilder.d.ts.map +1 -1
- package/lib/validationResultBuilder.js.map +1 -1
- package/package.json +37 -16
- package/dist/test/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview In this file, we will test the path helper functions described in /src/properties/path_helper.js
|
|
7
|
+
*/
|
|
8
|
+
import { expect } from "chai";
|
|
9
|
+
import { PathHelper } from "../pathHelper.js";
|
|
10
|
+
describe("PathHelper", function () {
|
|
11
|
+
describe("tokenizePathString", function () {
|
|
12
|
+
it("should work for simple paths separated by dots", function () {
|
|
13
|
+
let types = [];
|
|
14
|
+
expect(PathHelper.tokenizePathString("", types)).to.deep.equal([]);
|
|
15
|
+
expect(types).to.deep.equal([]);
|
|
16
|
+
expect(PathHelper.tokenizePathString("test", types)).to.deep.equal(["test"]);
|
|
17
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);
|
|
18
|
+
expect(PathHelper.tokenizePathString("test.test2", types)).to.deep.equal([
|
|
19
|
+
"test",
|
|
20
|
+
"test2",
|
|
21
|
+
]);
|
|
22
|
+
expect(types).to.deep.equal([
|
|
23
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
24
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
25
|
+
]);
|
|
26
|
+
expect(function () {
|
|
27
|
+
PathHelper.tokenizePathString(".test2");
|
|
28
|
+
}).to.throw();
|
|
29
|
+
expect(function () {
|
|
30
|
+
PathHelper.tokenizePathString("test2.");
|
|
31
|
+
}).to.throw();
|
|
32
|
+
expect(function () {
|
|
33
|
+
PathHelper.tokenizePathString(".");
|
|
34
|
+
}).to.throw();
|
|
35
|
+
});
|
|
36
|
+
it("should work for arrays", function () {
|
|
37
|
+
let types = [];
|
|
38
|
+
expect(PathHelper.tokenizePathString("[test]", types)).to.deep.equal(["test"]);
|
|
39
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.ARRAY_TOKEN]);
|
|
40
|
+
expect(PathHelper.tokenizePathString("[test][test2]", types)).to.deep.equal([
|
|
41
|
+
"test",
|
|
42
|
+
"test2",
|
|
43
|
+
]);
|
|
44
|
+
expect(types).to.deep.equal([
|
|
45
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
46
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
47
|
+
]);
|
|
48
|
+
expect(function () {
|
|
49
|
+
PathHelper.tokenizePathString("[");
|
|
50
|
+
}).to.throw();
|
|
51
|
+
expect(function () {
|
|
52
|
+
PathHelper.tokenizePathString("[abcd");
|
|
53
|
+
}).to.throw();
|
|
54
|
+
expect(function () {
|
|
55
|
+
PathHelper.tokenizePathString("]");
|
|
56
|
+
}).to.throw();
|
|
57
|
+
expect(function () {
|
|
58
|
+
PathHelper.tokenizePathString("[abcd]]");
|
|
59
|
+
}).to.throw();
|
|
60
|
+
expect(function () {
|
|
61
|
+
PathHelper.tokenizePathString("[]");
|
|
62
|
+
}).to.throw();
|
|
63
|
+
});
|
|
64
|
+
it("should work for combinations of arrays and paths separated by dots", function () {
|
|
65
|
+
let types = [];
|
|
66
|
+
expect(PathHelper.tokenizePathString("map[test]", types)).to.deep.equal([
|
|
67
|
+
"map",
|
|
68
|
+
"test",
|
|
69
|
+
]);
|
|
70
|
+
expect(types).to.deep.equal([
|
|
71
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
72
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
73
|
+
]);
|
|
74
|
+
expect(PathHelper.tokenizePathString("[test].parameter", types)).to.deep.equal([
|
|
75
|
+
"test",
|
|
76
|
+
"parameter",
|
|
77
|
+
]);
|
|
78
|
+
expect(types).to.deep.equal([
|
|
79
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
80
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
81
|
+
]);
|
|
82
|
+
expect(PathHelper.tokenizePathString("map[test].parameter[test2]", types)).to.deep.equal(["map", "test", "parameter", "test2"]);
|
|
83
|
+
expect(types).to.deep.equal([
|
|
84
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
85
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
86
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
87
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
88
|
+
]);
|
|
89
|
+
expect(function () {
|
|
90
|
+
PathHelper.tokenizePathString("[test]parameter");
|
|
91
|
+
}).to.throw();
|
|
92
|
+
});
|
|
93
|
+
it("should work for quoted tokens", function () {
|
|
94
|
+
let types = [];
|
|
95
|
+
expect(PathHelper.tokenizePathString('"test"', types)).to.deep.equal(["test"]);
|
|
96
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);
|
|
97
|
+
expect(PathHelper.tokenizePathString('"te\\"st"', types)).to.deep.equal(['te"st']);
|
|
98
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);
|
|
99
|
+
expect(PathHelper.tokenizePathString('"te\\\\st"', types)).to.deep.equal(["te\\st"]);
|
|
100
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);
|
|
101
|
+
expect(PathHelper.tokenizePathString('""', types)).to.deep.equal([""]);
|
|
102
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);
|
|
103
|
+
expect(PathHelper.tokenizePathString('"test1".test2', types)).to.deep.equal([
|
|
104
|
+
"test1",
|
|
105
|
+
"test2",
|
|
106
|
+
]);
|
|
107
|
+
expect(types).to.deep.equal([
|
|
108
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
109
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
110
|
+
]);
|
|
111
|
+
expect(PathHelper.tokenizePathString('"test1"."test2"', types)).to.deep.equal([
|
|
112
|
+
"test1",
|
|
113
|
+
"test2",
|
|
114
|
+
]);
|
|
115
|
+
expect(types).to.deep.equal([
|
|
116
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
117
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
118
|
+
]);
|
|
119
|
+
expect(PathHelper.tokenizePathString('test1."test2"', types)).to.deep.equal([
|
|
120
|
+
"test1",
|
|
121
|
+
"test2",
|
|
122
|
+
]);
|
|
123
|
+
expect(types).to.deep.equal([
|
|
124
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
125
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
126
|
+
]);
|
|
127
|
+
expect(PathHelper.tokenizePathString('test1["test2"]', types)).to.deep.equal([
|
|
128
|
+
"test1",
|
|
129
|
+
"test2",
|
|
130
|
+
]);
|
|
131
|
+
expect(types).to.deep.equal([
|
|
132
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
133
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
134
|
+
]);
|
|
135
|
+
expect(PathHelper.tokenizePathString('"test1"["test2"]', types)).to.deep.equal([
|
|
136
|
+
"test1",
|
|
137
|
+
"test2",
|
|
138
|
+
]);
|
|
139
|
+
expect(types).to.deep.equal([
|
|
140
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
141
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
142
|
+
]);
|
|
143
|
+
expect(PathHelper.tokenizePathString('""[""]', types)).to.deep.equal(["", ""]);
|
|
144
|
+
expect(types).to.deep.equal([
|
|
145
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
146
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
147
|
+
]);
|
|
148
|
+
expect(PathHelper.tokenizePathString('"/"', types)).to.deep.equal(["/"]);
|
|
149
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);
|
|
150
|
+
expect(PathHelper.tokenizePathString("/", types)).to.deep.equal(["/"]);
|
|
151
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN]);
|
|
152
|
+
expect(PathHelper.tokenizePathString("/test", types)).to.deep.equal(["/", "test"]);
|
|
153
|
+
expect(types).to.deep.equal([
|
|
154
|
+
PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN,
|
|
155
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
156
|
+
]);
|
|
157
|
+
expect(PathHelper.tokenizePathString("/[test]", types)).to.deep.equal(["/", "test"]);
|
|
158
|
+
expect(types).to.deep.equal([
|
|
159
|
+
PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN,
|
|
160
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
161
|
+
]);
|
|
162
|
+
expect(PathHelper.tokenizePathString("*", types)).to.deep.equal(["*"]);
|
|
163
|
+
expect(types).to.deep.equal([PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN]);
|
|
164
|
+
expect(PathHelper.tokenizePathString("test*", types)).to.deep.equal(["test", "*"]);
|
|
165
|
+
expect(types).to.deep.equal([
|
|
166
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
167
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
168
|
+
]);
|
|
169
|
+
expect(PathHelper.tokenizePathString("*.test", types)).to.deep.equal(["*", "test"]);
|
|
170
|
+
expect(types).to.deep.equal([
|
|
171
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
172
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
173
|
+
]);
|
|
174
|
+
expect(function () {
|
|
175
|
+
PathHelper.tokenizePathString("*test", types);
|
|
176
|
+
}).to.throw();
|
|
177
|
+
expect(function () {
|
|
178
|
+
PathHelper.tokenizePathString("test*test", types);
|
|
179
|
+
}).to.throw();
|
|
180
|
+
expect(PathHelper.tokenizePathString("*.test*.test2*", types)).to.deep.equal([
|
|
181
|
+
"*",
|
|
182
|
+
"test",
|
|
183
|
+
"*",
|
|
184
|
+
"test2",
|
|
185
|
+
"*",
|
|
186
|
+
]);
|
|
187
|
+
expect(types).to.deep.equal([
|
|
188
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
189
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
190
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
191
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
192
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
193
|
+
]);
|
|
194
|
+
expect(PathHelper.tokenizePathString("/*", types)).to.deep.equal(["/", "*"]);
|
|
195
|
+
expect(types).to.deep.equal([
|
|
196
|
+
PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN,
|
|
197
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
198
|
+
]);
|
|
199
|
+
expect(PathHelper.tokenizePathString("*[test]", types)).to.deep.equal(["*", "test"]);
|
|
200
|
+
expect(types).to.deep.equal([
|
|
201
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
202
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
203
|
+
]);
|
|
204
|
+
expect(PathHelper.tokenizePathString("[test]*", types)).to.deep.equal(["test", "*"]);
|
|
205
|
+
expect(types).to.deep.equal([
|
|
206
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
207
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
208
|
+
]);
|
|
209
|
+
expect(PathHelper.tokenizePathString("[test]*.test2", types)).to.deep.equal([
|
|
210
|
+
"test",
|
|
211
|
+
"*",
|
|
212
|
+
"test2",
|
|
213
|
+
]);
|
|
214
|
+
expect(types).to.deep.equal([
|
|
215
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
216
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
217
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
218
|
+
]);
|
|
219
|
+
expect(PathHelper.tokenizePathString("[test]*[test2]", types)).to.deep.equal([
|
|
220
|
+
"test",
|
|
221
|
+
"*",
|
|
222
|
+
"test2",
|
|
223
|
+
]);
|
|
224
|
+
expect(types).to.deep.equal([
|
|
225
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
226
|
+
PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,
|
|
227
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
228
|
+
]);
|
|
229
|
+
expect(function () {
|
|
230
|
+
PathHelper.tokenizePathString("[test]*test", types);
|
|
231
|
+
}).to.throw();
|
|
232
|
+
expect(function () {
|
|
233
|
+
PathHelper.tokenizePathString('"');
|
|
234
|
+
}).to.throw();
|
|
235
|
+
expect(function () {
|
|
236
|
+
PathHelper.tokenizePathString('test"');
|
|
237
|
+
}).to.throw();
|
|
238
|
+
expect(function () {
|
|
239
|
+
PathHelper.tokenizePathString('"tests');
|
|
240
|
+
}).to.throw();
|
|
241
|
+
expect(function () {
|
|
242
|
+
PathHelper.tokenizePathString('"\\a"');
|
|
243
|
+
}).to.throw();
|
|
244
|
+
});
|
|
245
|
+
it("should work for relative paths", function () {
|
|
246
|
+
let types = [];
|
|
247
|
+
expect(PathHelper.tokenizePathString("../test", types)).to.deep.equal(["../", "test"]);
|
|
248
|
+
expect(types).to.deep.equal([
|
|
249
|
+
PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,
|
|
250
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
251
|
+
]);
|
|
252
|
+
expect(PathHelper.tokenizePathString("../../../test", types)).to.deep.equal([
|
|
253
|
+
"../",
|
|
254
|
+
"../",
|
|
255
|
+
"../",
|
|
256
|
+
"test",
|
|
257
|
+
]);
|
|
258
|
+
expect(types).to.deep.equal([
|
|
259
|
+
PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,
|
|
260
|
+
PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,
|
|
261
|
+
PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,
|
|
262
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
263
|
+
]);
|
|
264
|
+
expect(PathHelper.tokenizePathString("../../test[0].test2[key]", types)).to.deep.equal([
|
|
265
|
+
"../",
|
|
266
|
+
"../",
|
|
267
|
+
"test",
|
|
268
|
+
"0",
|
|
269
|
+
"test2",
|
|
270
|
+
"key",
|
|
271
|
+
]);
|
|
272
|
+
expect(types).to.deep.equal([
|
|
273
|
+
PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,
|
|
274
|
+
PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,
|
|
275
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
276
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
277
|
+
PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,
|
|
278
|
+
PathHelper.TOKEN_TYPES.ARRAY_TOKEN,
|
|
279
|
+
]);
|
|
280
|
+
expect(function () {
|
|
281
|
+
PathHelper.tokenizePathString("/../test2");
|
|
282
|
+
}).to.throw();
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
describe("quotePathSegment", function () {
|
|
286
|
+
it("should quote simple strings", function () {
|
|
287
|
+
expect(PathHelper.quotePathSegment("test")).to.equal('"test"');
|
|
288
|
+
expect(JSON.parse(PathHelper.quotePathSegment("test"))).to.equal("test");
|
|
289
|
+
});
|
|
290
|
+
it("should correctly quote strings with a quotation mark", function () {
|
|
291
|
+
expect(PathHelper.quotePathSegment('"')).to.equal('"\\""');
|
|
292
|
+
expect(JSON.parse(PathHelper.quotePathSegment('"'))).to.equal('"');
|
|
293
|
+
});
|
|
294
|
+
it("should correctly quote strings with a backslash", function () {
|
|
295
|
+
expect(PathHelper.quotePathSegment("\\")).to.equal('"\\\\"');
|
|
296
|
+
expect(JSON.parse(PathHelper.quotePathSegment("\\"))).to.equal("\\");
|
|
297
|
+
});
|
|
298
|
+
it("should work for paths with multiple occurrences of the test string", function () {
|
|
299
|
+
expect(PathHelper.quotePathSegment('test"property"')).to.equal('"test\\"property\\""');
|
|
300
|
+
expect(PathHelper.quotePathSegment("test\\property\\")).to.equal('"test\\\\property\\\\"');
|
|
301
|
+
expect(PathHelper.quotePathSegment('test"\\property\\"')).to.equal('"test\\"\\\\property\\\\\\""');
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
describe("quotePathSegmentIfNeeded", function () {
|
|
305
|
+
it("should quote all required strings", function () {
|
|
306
|
+
expect(PathHelper.quotePathSegmentIfNeeded(".")).to.equal('"."');
|
|
307
|
+
expect(PathHelper.quotePathSegmentIfNeeded('"')).to.equal('"\\""');
|
|
308
|
+
expect(PathHelper.quotePathSegmentIfNeeded("\\")).to.equal('"\\\\"');
|
|
309
|
+
expect(PathHelper.quotePathSegmentIfNeeded("[")).to.equal('"["');
|
|
310
|
+
expect(PathHelper.quotePathSegmentIfNeeded("]")).to.equal('"]"');
|
|
311
|
+
expect(PathHelper.quotePathSegmentIfNeeded("")).to.equal('""');
|
|
312
|
+
expect(PathHelper.quotePathSegmentIfNeeded("/")).to.equal('"/"');
|
|
313
|
+
expect(PathHelper.quotePathSegmentIfNeeded("*")).to.equal('"*"');
|
|
314
|
+
});
|
|
315
|
+
it("should not quote other strings", function () {
|
|
316
|
+
expect(PathHelper.quotePathSegmentIfNeeded("abcd")).to.equal("abcd");
|
|
317
|
+
expect(PathHelper.quotePathSegmentIfNeeded("test_string")).to.equal("test_string");
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
describe("unquotePathSegment", function () {
|
|
321
|
+
it("should unquote simple strings", function () {
|
|
322
|
+
expect(PathHelper.unquotePathSegment('"test"')).to.equal("test");
|
|
323
|
+
});
|
|
324
|
+
it("should correctly unquote strings with a quotation mark", function () {
|
|
325
|
+
expect(PathHelper.unquotePathSegment('"\\""')).to.equal('"');
|
|
326
|
+
});
|
|
327
|
+
it("should correctly unquote strings with a backslash", function () {
|
|
328
|
+
expect(PathHelper.unquotePathSegment('"\\\\"')).to.equal("\\");
|
|
329
|
+
});
|
|
330
|
+
it("should work with empty strings", function () {
|
|
331
|
+
expect(PathHelper.unquotePathSegment("")).to.equal("");
|
|
332
|
+
});
|
|
333
|
+
it("should throw on non strings", function () {
|
|
334
|
+
// @ts-ignore
|
|
335
|
+
expect(() => PathHelper.unquotePathSegment(5)).to.throw();
|
|
336
|
+
});
|
|
337
|
+
it("should work for paths with multiple occurrences of the test string", function () {
|
|
338
|
+
expect(PathHelper.unquotePathSegment('"test\\"property\\""')).to.equal('test"property"');
|
|
339
|
+
expect(PathHelper.unquotePathSegment('"test\\\\property\\\\"')).to.equal("test\\property\\");
|
|
340
|
+
expect(PathHelper.unquotePathSegment('"test\\"\\\\property\\\\\\""')).to.equal('test"\\property\\"');
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
describe("convertAbsolutePathToCanonical", function () {
|
|
344
|
+
it("should remove leading /", function () {
|
|
345
|
+
expect(PathHelper.convertAbsolutePathToCanonical("/a.b.c")).to.equal("a.b.c");
|
|
346
|
+
});
|
|
347
|
+
it("should throw on ../", function () {
|
|
348
|
+
expect(() => PathHelper.convertAbsolutePathToCanonical("../a.b.c")).to.throw("../");
|
|
349
|
+
});
|
|
350
|
+
it("should throw on *", function () {
|
|
351
|
+
expect(() => PathHelper.convertAbsolutePathToCanonical("/a.b.c*")).to.throw("*");
|
|
352
|
+
});
|
|
353
|
+
it("should replace square brackets by periods", function () {
|
|
354
|
+
expect(PathHelper.convertAbsolutePathToCanonical("/a.b[c]")).to.equal("a.b.c");
|
|
355
|
+
expect(PathHelper.convertAbsolutePathToCanonical("/a[b].c")).to.equal("a.b.c");
|
|
356
|
+
});
|
|
357
|
+
it("should keep properly escaped property names", function () {
|
|
358
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"."')).to.equal('"."');
|
|
359
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"\\""')).to.equal('"\\""');
|
|
360
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"\\\\"')).to.equal('"\\\\"');
|
|
361
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"["')).to.equal('"["');
|
|
362
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"]"')).to.equal('"]"');
|
|
363
|
+
expect(PathHelper.convertAbsolutePathToCanonical('""')).to.equal('""');
|
|
364
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"/"')).to.equal('"/"');
|
|
365
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"*"')).to.equal('"*"');
|
|
366
|
+
});
|
|
367
|
+
it("should properly unescape unusually escaped property names", function () {
|
|
368
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"a"."b"')).to.equal("a.b");
|
|
369
|
+
expect(PathHelper.convertAbsolutePathToCanonical('"a"[b]["c"]')).to.equal("a.b.c");
|
|
370
|
+
});
|
|
371
|
+
it("should not modify simple paths", function () {
|
|
372
|
+
expect(PathHelper.convertAbsolutePathToCanonical("a.b.c.d")).to.equal("a.b.c.d");
|
|
373
|
+
expect(PathHelper.convertAbsolutePathToCanonical("test_string")).to.equal("test_string");
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
describe("getPathCoverage", function () {
|
|
377
|
+
this.timeout(500);
|
|
378
|
+
let paths;
|
|
379
|
+
it("should succeed if property is included in a path 1", function () {
|
|
380
|
+
paths = ["a.b"];
|
|
381
|
+
const res = PathHelper.getPathCoverage("a.b", paths);
|
|
382
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.FULLY_COVERED);
|
|
383
|
+
expect(res.pathList).to.deep.equal(["a.b"]);
|
|
384
|
+
});
|
|
385
|
+
it("should succeed if property is included in a path 2", function () {
|
|
386
|
+
paths = ["a.b"];
|
|
387
|
+
const res = PathHelper.getPathCoverage("a.b.c", paths);
|
|
388
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.FULLY_COVERED);
|
|
389
|
+
expect(res.pathList).to.deep.equal(["a.b"]);
|
|
390
|
+
});
|
|
391
|
+
it("should succeed if property is included in a path 3", function () {
|
|
392
|
+
paths = ["a.b"];
|
|
393
|
+
const res = PathHelper.getPathCoverage("a.b.c.d", paths);
|
|
394
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.FULLY_COVERED);
|
|
395
|
+
expect(res.pathList).to.deep.equal(["a.b"]);
|
|
396
|
+
});
|
|
397
|
+
it("should fail if property is not included in any path 1", function () {
|
|
398
|
+
paths = ["a.b"];
|
|
399
|
+
const res = PathHelper.getPathCoverage("b", paths);
|
|
400
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);
|
|
401
|
+
expect(res.pathList).to.deep.equal([]);
|
|
402
|
+
});
|
|
403
|
+
it("should fail if property is not included in any path 2", function () {
|
|
404
|
+
paths = ["a.b"];
|
|
405
|
+
const res = PathHelper.getPathCoverage("b.f.g", paths);
|
|
406
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);
|
|
407
|
+
expect(res.pathList).to.deep.equal([]);
|
|
408
|
+
});
|
|
409
|
+
it("should fail if property is not included in any path but have common root 1", function () {
|
|
410
|
+
paths = ["a.b"];
|
|
411
|
+
const res = PathHelper.getPathCoverage("a.h", paths);
|
|
412
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);
|
|
413
|
+
expect(res.pathList).to.deep.equal([]);
|
|
414
|
+
});
|
|
415
|
+
it("should fail if property is not included in any path but have common root 2", function () {
|
|
416
|
+
paths = ["a.b"];
|
|
417
|
+
const res = PathHelper.getPathCoverage("a.i.j", paths);
|
|
418
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);
|
|
419
|
+
expect(res.pathList).to.deep.equal([]);
|
|
420
|
+
});
|
|
421
|
+
it("should succeed if path goes through the property 1", function () {
|
|
422
|
+
paths = ["a.b.c", "a.b.d", "z"];
|
|
423
|
+
const res = PathHelper.getPathCoverage("a.b", paths);
|
|
424
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.PARTLY_COVERED);
|
|
425
|
+
expect(res.pathList).to.deep.equal(["a.b.c", "a.b.d"]);
|
|
426
|
+
});
|
|
427
|
+
it("should succeed if path goes through the property 2", function () {
|
|
428
|
+
paths = ["z", "a.b.c", "a.b.d"];
|
|
429
|
+
const res = PathHelper.getPathCoverage("a.b", paths);
|
|
430
|
+
expect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.PARTLY_COVERED);
|
|
431
|
+
expect(res.pathList).to.deep.equal(["a.b.c", "a.b.d"]);
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434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AAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oDAAoD,EAAE;YACxD,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;YAChC,MAAM,GAAG,GAAG,UAAU,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACrD,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;YAC9E,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oDAAoD,EAAE;YACxD,KAAK,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAChC,MAAM,GAAG,GAAG,UAAU,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACrD,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;YAC9E,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview In this file, we will test the path helper functions described in /src/properties/path_helper.js\n */\n\nimport { expect } from \"chai\";\n\nimport { PathHelper } from \"../pathHelper.js\";\n\ndescribe(\"PathHelper\", function () {\n\tdescribe(\"tokenizePathString\", function () {\n\t\tit(\"should work for simple paths separated by dots\", function () {\n\t\t\tlet types = [];\n\t\t\texpect(PathHelper.tokenizePathString(\"\", types)).to.deep.equal([]);\n\t\t\texpect(types).to.deep.equal([]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"test\", types)).to.deep.equal([\"test\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"test.test2\", types)).to.deep.equal([\n\t\t\t\t\"test\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\".test2\");\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"test2.\");\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\".\");\n\t\t\t}).to.throw();\n\t\t});\n\n\t\tit(\"should work for arrays\", function () {\n\t\t\tlet types = [];\n\t\t\texpect(PathHelper.tokenizePathString(\"[test]\", types)).to.deep.equal([\"test\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.ARRAY_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"[test][test2]\", types)).to.deep.equal([\n\t\t\t\t\"test\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"[\");\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"[abcd\");\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"]\");\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"[abcd]]\");\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"[]\");\n\t\t\t}).to.throw();\n\t\t});\n\n\t\tit(\"should work for combinations of arrays and paths separated by dots\", function () {\n\t\t\tlet types = [];\n\t\t\texpect(PathHelper.tokenizePathString(\"map[test]\", types)).to.deep.equal([\n\t\t\t\t\"map\",\n\t\t\t\t\"test\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"[test].parameter\", types)).to.deep.equal([\n\t\t\t\t\"test\",\n\t\t\t\t\"parameter\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(\n\t\t\t\tPathHelper.tokenizePathString(\"map[test].parameter[test2]\", types),\n\t\t\t).to.deep.equal([\"map\", \"test\", \"parameter\", \"test2\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"[test]parameter\");\n\t\t\t}).to.throw();\n\t\t});\n\n\t\tit(\"should work for quoted tokens\", function () {\n\t\t\tlet types = [];\n\t\t\texpect(PathHelper.tokenizePathString('\"test\"', types)).to.deep.equal([\"test\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"te\\\\\"st\"', types)).to.deep.equal(['te\"st']);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"te\\\\\\\\st\"', types)).to.deep.equal([\"te\\\\st\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"\"', types)).to.deep.equal([\"\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"test1\".test2', types)).to.deep.equal([\n\t\t\t\t\"test1\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"test1\".\"test2\"', types)).to.deep.equal([\n\t\t\t\t\"test1\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString('test1.\"test2\"', types)).to.deep.equal([\n\t\t\t\t\"test1\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString('test1[\"test2\"]', types)).to.deep.equal([\n\t\t\t\t\"test1\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"test1\"[\"test2\"]', types)).to.deep.equal([\n\t\t\t\t\"test1\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"\"[\"\"]', types)).to.deep.equal([\"\", \"\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString('\"/\"', types)).to.deep.equal([\"/\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"/\", types)).to.deep.equal([\"/\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"/test\", types)).to.deep.equal([\"/\", \"test\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"/[test]\", types)).to.deep.equal([\"/\", \"test\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"*\", types)).to.deep.equal([\"*\"]);\n\t\t\texpect(types).to.deep.equal([PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"test*\", types)).to.deep.equal([\"test\", \"*\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"*.test\", types)).to.deep.equal([\"*\", \"test\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"*test\", types);\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"test*test\", types);\n\t\t\t}).to.throw();\n\n\t\t\texpect(PathHelper.tokenizePathString(\"*.test*.test2*\", types)).to.deep.equal([\n\t\t\t\t\"*\",\n\t\t\t\t\"test\",\n\t\t\t\t\"*\",\n\t\t\t\t\"test2\",\n\t\t\t\t\"*\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"/*\", types)).to.deep.equal([\"/\", \"*\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"*[test]\", types)).to.deep.equal([\"*\", \"test\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"[test]*\", types)).to.deep.equal([\"test\", \"*\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"[test]*.test2\", types)).to.deep.equal([\n\t\t\t\t\"test\",\n\t\t\t\t\"*\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"[test]*[test2]\", types)).to.deep.equal([\n\t\t\t\t\"test\",\n\t\t\t\t\"*\",\n\t\t\t\t\"test2\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"[test]*test\", types);\n\t\t\t}).to.throw();\n\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString('\"');\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString('test\"');\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString('\"tests');\n\t\t\t}).to.throw();\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString('\"\\\\a\"');\n\t\t\t}).to.throw();\n\t\t});\n\n\t\tit(\"should work for relative paths\", function () {\n\t\t\tlet types = [];\n\t\t\texpect(PathHelper.tokenizePathString(\"../test\", types)).to.deep.equal([\"../\", \"test\"]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"../../../test\", types)).to.deep.equal([\n\t\t\t\t\"../\",\n\t\t\t\t\"../\",\n\t\t\t\t\"../\",\n\t\t\t\t\"test\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(PathHelper.tokenizePathString(\"../../test[0].test2[key]\", types)).to.deep.equal([\n\t\t\t\t\"../\",\n\t\t\t\t\"../\",\n\t\t\t\t\"test\",\n\t\t\t\t\"0\",\n\t\t\t\t\"test2\",\n\t\t\t\t\"key\",\n\t\t\t]);\n\t\t\texpect(types).to.deep.equal([\n\t\t\t\tPathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN,\n\t\t\t\tPathHelper.TOKEN_TYPES.ARRAY_TOKEN,\n\t\t\t]);\n\n\t\t\texpect(function () {\n\t\t\t\tPathHelper.tokenizePathString(\"/../test2\");\n\t\t\t}).to.throw();\n\t\t});\n\t});\n\n\tdescribe(\"quotePathSegment\", function () {\n\t\tit(\"should quote simple strings\", function () {\n\t\t\texpect(PathHelper.quotePathSegment(\"test\")).to.equal('\"test\"');\n\t\t\texpect(JSON.parse(PathHelper.quotePathSegment(\"test\"))).to.equal(\"test\");\n\t\t});\n\t\tit(\"should correctly quote strings with a quotation mark\", function () {\n\t\t\texpect(PathHelper.quotePathSegment('\"')).to.equal('\"\\\\\"\"');\n\t\t\texpect(JSON.parse(PathHelper.quotePathSegment('\"'))).to.equal('\"');\n\t\t});\n\t\tit(\"should correctly quote strings with a backslash\", function () {\n\t\t\texpect(PathHelper.quotePathSegment(\"\\\\\")).to.equal('\"\\\\\\\\\"');\n\t\t\texpect(JSON.parse(PathHelper.quotePathSegment(\"\\\\\"))).to.equal(\"\\\\\");\n\t\t});\n\n\t\tit(\"should work for paths with multiple occurrences of the test string\", function () {\n\t\t\texpect(PathHelper.quotePathSegment('test\"property\"')).to.equal('\"test\\\\\"property\\\\\"\"');\n\t\t\texpect(PathHelper.quotePathSegment(\"test\\\\property\\\\\")).to.equal(\n\t\t\t\t'\"test\\\\\\\\property\\\\\\\\\"',\n\t\t\t);\n\t\t\texpect(PathHelper.quotePathSegment('test\"\\\\property\\\\\"')).to.equal(\n\t\t\t\t'\"test\\\\\"\\\\\\\\property\\\\\\\\\\\\\"\"',\n\t\t\t);\n\t\t});\n\t});\n\n\tdescribe(\"quotePathSegmentIfNeeded\", function () {\n\t\tit(\"should quote all required strings\", function () {\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\".\")).to.equal('\".\"');\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded('\"')).to.equal('\"\\\\\"\"');\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"\\\\\")).to.equal('\"\\\\\\\\\"');\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"[\")).to.equal('\"[\"');\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"]\")).to.equal('\"]\"');\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"\")).to.equal('\"\"');\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"/\")).to.equal('\"/\"');\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"*\")).to.equal('\"*\"');\n\t\t});\n\n\t\tit(\"should not quote other strings\", function () {\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"abcd\")).to.equal(\"abcd\");\n\t\t\texpect(PathHelper.quotePathSegmentIfNeeded(\"test_string\")).to.equal(\"test_string\");\n\t\t});\n\t});\n\n\tdescribe(\"unquotePathSegment\", function () {\n\t\tit(\"should unquote simple strings\", function () {\n\t\t\texpect(PathHelper.unquotePathSegment('\"test\"')).to.equal(\"test\");\n\t\t});\n\n\t\tit(\"should correctly unquote strings with a quotation mark\", function () {\n\t\t\texpect(PathHelper.unquotePathSegment('\"\\\\\"\"')).to.equal('\"');\n\t\t});\n\n\t\tit(\"should correctly unquote strings with a backslash\", function () {\n\t\t\texpect(PathHelper.unquotePathSegment('\"\\\\\\\\\"')).to.equal(\"\\\\\");\n\t\t});\n\n\t\tit(\"should work with empty strings\", function () {\n\t\t\texpect(PathHelper.unquotePathSegment(\"\")).to.equal(\"\");\n\t\t});\n\n\t\tit(\"should throw on non strings\", function () {\n\t\t\t// @ts-ignore\n\t\t\texpect(() => PathHelper.unquotePathSegment(5)).to.throw();\n\t\t});\n\n\t\tit(\"should work for paths with multiple occurrences of the test string\", function () {\n\t\t\texpect(PathHelper.unquotePathSegment('\"test\\\\\"property\\\\\"\"')).to.equal(\n\t\t\t\t'test\"property\"',\n\t\t\t);\n\t\t\texpect(PathHelper.unquotePathSegment('\"test\\\\\\\\property\\\\\\\\\"')).to.equal(\n\t\t\t\t\"test\\\\property\\\\\",\n\t\t\t);\n\t\t\texpect(PathHelper.unquotePathSegment('\"test\\\\\"\\\\\\\\property\\\\\\\\\\\\\"\"')).to.equal(\n\t\t\t\t'test\"\\\\property\\\\\"',\n\t\t\t);\n\t\t});\n\t});\n\n\tdescribe(\"convertAbsolutePathToCanonical\", function () {\n\t\tit(\"should remove leading /\", function () {\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical(\"/a.b.c\")).to.equal(\"a.b.c\");\n\t\t});\n\n\t\tit(\"should throw on ../\", function () {\n\t\t\texpect(() => PathHelper.convertAbsolutePathToCanonical(\"../a.b.c\")).to.throw(\"../\");\n\t\t});\n\n\t\tit(\"should throw on *\", function () {\n\t\t\texpect(() => PathHelper.convertAbsolutePathToCanonical(\"/a.b.c*\")).to.throw(\"*\");\n\t\t});\n\n\t\tit(\"should replace square brackets by periods\", function () {\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical(\"/a.b[c]\")).to.equal(\"a.b.c\");\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical(\"/a[b].c\")).to.equal(\"a.b.c\");\n\t\t});\n\n\t\tit(\"should keep properly escaped property names\", function () {\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\".\"')).to.equal('\".\"');\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"\\\\\"\"')).to.equal('\"\\\\\"\"');\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"\\\\\\\\\"')).to.equal('\"\\\\\\\\\"');\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"[\"')).to.equal('\"[\"');\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"]\"')).to.equal('\"]\"');\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"\"')).to.equal('\"\"');\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"/\"')).to.equal('\"/\"');\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"*\"')).to.equal('\"*\"');\n\t\t});\n\n\t\tit(\"should properly unescape unusually escaped property names\", function () {\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"a\".\"b\"')).to.equal(\"a.b\");\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical('\"a\"[b][\"c\"]')).to.equal(\"a.b.c\");\n\t\t});\n\n\t\tit(\"should not modify simple paths\", function () {\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical(\"a.b.c.d\")).to.equal(\"a.b.c.d\");\n\t\t\texpect(PathHelper.convertAbsolutePathToCanonical(\"test_string\")).to.equal(\n\t\t\t\t\"test_string\",\n\t\t\t);\n\t\t});\n\t});\n\n\tdescribe(\"getPathCoverage\", function () {\n\t\tthis.timeout(500);\n\t\tlet paths;\n\n\t\tit(\"should succeed if property is included in a path 1\", function () {\n\t\t\tpaths = [\"a.b\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"a.b\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.FULLY_COVERED);\n\t\t\texpect(res.pathList).to.deep.equal([\"a.b\"]);\n\t\t});\n\n\t\tit(\"should succeed if property is included in a path 2\", function () {\n\t\t\tpaths = [\"a.b\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"a.b.c\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.FULLY_COVERED);\n\t\t\texpect(res.pathList).to.deep.equal([\"a.b\"]);\n\t\t});\n\n\t\tit(\"should succeed if property is included in a path 3\", function () {\n\t\t\tpaths = [\"a.b\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"a.b.c.d\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.FULLY_COVERED);\n\t\t\texpect(res.pathList).to.deep.equal([\"a.b\"]);\n\t\t});\n\n\t\tit(\"should fail if property is not included in any path 1\", function () {\n\t\t\tpaths = [\"a.b\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"b\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);\n\t\t\texpect(res.pathList).to.deep.equal([]);\n\t\t});\n\n\t\tit(\"should fail if property is not included in any path 2\", function () {\n\t\t\tpaths = [\"a.b\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"b.f.g\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);\n\t\t\texpect(res.pathList).to.deep.equal([]);\n\t\t});\n\n\t\tit(\"should fail if property is not included in any path but have common root 1\", function () {\n\t\t\tpaths = [\"a.b\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"a.h\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);\n\t\t\texpect(res.pathList).to.deep.equal([]);\n\t\t});\n\n\t\tit(\"should fail if property is not included in any path but have common root 2\", function () {\n\t\t\tpaths = [\"a.b\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"a.i.j\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.UNCOVERED);\n\t\t\texpect(res.pathList).to.deep.equal([]);\n\t\t});\n\n\t\tit(\"should succeed if path goes through the property 1\", function () {\n\t\t\tpaths = [\"a.b.c\", \"a.b.d\", \"z\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"a.b\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.PARTLY_COVERED);\n\t\t\texpect(res.pathList).to.deep.equal([\"a.b.c\", \"a.b.d\"]);\n\t\t});\n\n\t\tit(\"should succeed if path goes through the property 2\", function () {\n\t\t\tpaths = [\"z\", \"a.b.c\", \"a.b.d\"];\n\t\t\tconst res = PathHelper.getPathCoverage(\"a.b\", paths);\n\t\t\texpect(res.coverageExtent).to.equal(PathHelper.CoverageExtent.PARTLY_COVERED);\n\t\t\texpect(res.pathList).to.deep.equal([\"a.b.c\", \"a.b.d\"]);\n\t\t});\n\t});\n});\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview In this file, we will test the path helper functions described in /src/properties/path_helper.js
|
|
7
|
+
*/
|
|
8
|
+
import { copy as cloneDeep } from "fastest-json-copy";
|
|
9
|
+
import { ChangeSet } from "../changeset.js";
|
|
10
|
+
describe("Reversible ChangeSets", function () {
|
|
11
|
+
it("Inverting a string map insert", () => {
|
|
12
|
+
const originalCS = {
|
|
13
|
+
"map<String>": {
|
|
14
|
+
selections: {
|
|
15
|
+
insert: {
|
|
16
|
+
target: "c6e96078-d1eb-8d41-219f-6f935794c453",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const invertedCS = new ChangeSet(cloneDeep(originalCS));
|
|
22
|
+
invertedCS.toInverseChangeSet();
|
|
23
|
+
const combined = new ChangeSet(originalCS);
|
|
24
|
+
combined.applyChangeSet(invertedCS);
|
|
25
|
+
});
|
|
26
|
+
it("Inverting a string map remove", () => {
|
|
27
|
+
const originalCS = {
|
|
28
|
+
"map<String>": {
|
|
29
|
+
selections: {
|
|
30
|
+
remove: {
|
|
31
|
+
target: "c6e96078-d1eb-8d41-219f-6f935794c453",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const invertedCS = new ChangeSet(cloneDeep(originalCS));
|
|
37
|
+
invertedCS.toInverseChangeSet();
|
|
38
|
+
const combined = new ChangeSet(originalCS);
|
|
39
|
+
combined.applyChangeSet(invertedCS);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=reversibleCs.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reversibleCs.spec.js","sourceRoot":"","sources":["../../src/test/reversibleCs.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,QAAQ,CAAC,uBAAuB,EAAE;IACjC,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACxC,MAAM,UAAU,GAAG;YAClB,aAAa,EAAE;gBACd,UAAU,EAAE;oBACX,MAAM,EAAE;wBACP,MAAM,EAAE,sCAAsC;qBAC9C;iBACD;aACD;SACD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QACxD,UAAU,CAAC,kBAAkB,EAAE,CAAC;QAEhC,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACxC,MAAM,UAAU,GAAG;YAClB,aAAa,EAAE;gBACd,UAAU,EAAE;oBACX,MAAM,EAAE;wBACP,MAAM,EAAE,sCAAsC;qBAC9C;iBACD;aACD;SACD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QACxD,UAAU,CAAC,kBAAkB,EAAE,CAAC;QAEhC,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview In this file, we will test the path helper functions described in /src/properties/path_helper.js\n */\n\nimport { copy as cloneDeep } from \"fastest-json-copy\";\n\nimport { ChangeSet } from \"../changeset.js\";\n\ndescribe(\"Reversible ChangeSets\", function () {\n\tit(\"Inverting a string map insert\", () => {\n\t\tconst originalCS = {\n\t\t\t\"map<String>\": {\n\t\t\t\tselections: {\n\t\t\t\t\tinsert: {\n\t\t\t\t\t\ttarget: \"c6e96078-d1eb-8d41-219f-6f935794c453\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t\tconst invertedCS = new ChangeSet(cloneDeep(originalCS));\n\t\tinvertedCS.toInverseChangeSet();\n\n\t\tconst combined = new ChangeSet(originalCS);\n\t\tcombined.applyChangeSet(invertedCS);\n\t});\n\n\tit(\"Inverting a string map remove\", () => {\n\t\tconst originalCS = {\n\t\t\t\"map<String>\": {\n\t\t\t\tselections: {\n\t\t\t\t\tremove: {\n\t\t\t\t\t\ttarget: \"c6e96078-d1eb-8d41-219f-6f935794c453\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t\tconst invertedCS = new ChangeSet(cloneDeep(originalCS));\n\t\tinvertedCS.toInverseChangeSet();\n\n\t\tconst combined = new ChangeSet(originalCS);\n\t\tcombined.applyChangeSet(invertedCS);\n\t});\n});\n"]}
|