@osdk/faux 0.6.0-beta.3 → 0.6.0-beta.5
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/CHANGELOG.md +23 -0
- package/build/browser/FauxFoundry/FauxDataStore.js +3 -2
- package/build/browser/FauxFoundry/FauxDataStore.js.map +1 -1
- package/build/browser/FauxFoundry/collections/DefaultMap.js +30 -0
- package/build/browser/FauxFoundry/collections/DefaultMap.js.map +1 -0
- package/build/browser/FauxFoundry/collections/SetMultiMap.js +43 -0
- package/build/browser/FauxFoundry/collections/SetMultiMap.js.map +1 -0
- package/build/browser/handlers/createObjectSetHandlers.js +51 -2
- package/build/browser/handlers/createObjectSetHandlers.js.map +1 -1
- package/build/cjs/index.cjs +100 -10
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/FauxFoundry/FauxDataStore.js +3 -2
- package/build/esm/FauxFoundry/FauxDataStore.js.map +1 -1
- package/build/esm/FauxFoundry/collections/DefaultMap.js +30 -0
- package/build/esm/FauxFoundry/collections/DefaultMap.js.map +1 -0
- package/build/esm/FauxFoundry/collections/SetMultiMap.js +43 -0
- package/build/esm/FauxFoundry/collections/SetMultiMap.js.map +1 -0
- package/build/esm/handlers/createObjectSetHandlers.js +51 -2
- package/build/esm/handlers/createObjectSetHandlers.js.map +1 -1
- package/build/types/FauxFoundry/FauxDataStore.d.ts.map +1 -1
- package/build/types/FauxFoundry/collections/DefaultMap.d.ts +8 -0
- package/build/types/FauxFoundry/collections/DefaultMap.d.ts.map +1 -0
- package/build/types/FauxFoundry/collections/SetMultiMap.d.ts +10 -0
- package/build/types/FauxFoundry/collections/SetMultiMap.d.ts.map +1 -0
- package/build/types/handlers/createObjectSetHandlers.d.ts.map +1 -1
- package/package.json +3 -4
- package/build/browser/FauxFoundry/FauxAdmin.test.js +0 -248
- package/build/browser/FauxFoundry/FauxAdmin.test.js.map +0 -1
- package/build/browser/FauxFoundry/FauxDataStore.test.js +0 -477
- package/build/browser/FauxFoundry/FauxDataStore.test.js.map +0 -1
- package/build/browser/FauxFoundry/filterObjects.test.js +0 -216
- package/build/browser/FauxFoundry/filterObjects.test.js.map +0 -1
- package/build/browser/FauxFoundry/filterTimeSeriesData.test.js +0 -116
- package/build/browser/FauxFoundry/filterTimeSeriesData.test.js.map +0 -1
- package/build/browser/FauxFoundry/validateAction.test.js +0 -523
- package/build/browser/FauxFoundry/validateAction.test.js.map +0 -1
- package/build/esm/FauxFoundry/FauxAdmin.test.js +0 -248
- package/build/esm/FauxFoundry/FauxAdmin.test.js.map +0 -1
- package/build/esm/FauxFoundry/FauxDataStore.test.js +0 -477
- package/build/esm/FauxFoundry/FauxDataStore.test.js.map +0 -1
- package/build/esm/FauxFoundry/filterObjects.test.js +0 -216
- package/build/esm/FauxFoundry/filterObjects.test.js.map +0 -1
- package/build/esm/FauxFoundry/filterTimeSeriesData.test.js +0 -116
- package/build/esm/FauxFoundry/filterTimeSeriesData.test.js.map +0 -1
- package/build/esm/FauxFoundry/validateAction.test.js +0 -523
- package/build/esm/FauxFoundry/validateAction.test.js.map +0 -1
- package/build/types/FauxFoundry/FauxAdmin.test.d.ts +0 -1
- package/build/types/FauxFoundry/FauxAdmin.test.d.ts.map +0 -1
- package/build/types/FauxFoundry/FauxDataStore.test.d.ts +0 -1
- package/build/types/FauxFoundry/FauxDataStore.test.d.ts.map +0 -1
- package/build/types/FauxFoundry/filterObjects.test.d.ts +0 -1
- package/build/types/FauxFoundry/filterObjects.test.d.ts.map +0 -1
- package/build/types/FauxFoundry/filterTimeSeriesData.test.d.ts +0 -1
- package/build/types/FauxFoundry/filterTimeSeriesData.test.d.ts.map +0 -1
- package/build/types/FauxFoundry/validateAction.test.d.ts +0 -1
- package/build/types/FauxFoundry/validateAction.test.d.ts.map +0 -1
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { describe, expect, it } from "vitest";
|
|
18
|
-
import { filterObjects } from "./filterObjects.js";
|
|
19
|
-
describe(filterObjects, () => {
|
|
20
|
-
const object1 = {
|
|
21
|
-
__apiName: "test-obj",
|
|
22
|
-
__primaryKey: "1",
|
|
23
|
-
name: "abc",
|
|
24
|
-
age: 25,
|
|
25
|
-
tags: ["red", "blue"],
|
|
26
|
-
description: "hello world example"
|
|
27
|
-
};
|
|
28
|
-
const object2 = {
|
|
29
|
-
__apiName: "test-obj",
|
|
30
|
-
__primaryKey: "3",
|
|
31
|
-
name: "cba abc",
|
|
32
|
-
age: 30,
|
|
33
|
-
tags: ["green"],
|
|
34
|
-
description: "foo bar baz"
|
|
35
|
-
};
|
|
36
|
-
const object3 = {
|
|
37
|
-
__apiName: "test-obj",
|
|
38
|
-
__primaryKey: "2",
|
|
39
|
-
name: "abcdef",
|
|
40
|
-
age: 25,
|
|
41
|
-
tags: ["red", "green"],
|
|
42
|
-
nickname: "red green",
|
|
43
|
-
description: "hi there friend"
|
|
44
|
-
};
|
|
45
|
-
const object4 = {
|
|
46
|
-
__apiName: "test-obj",
|
|
47
|
-
__primaryKey: "4",
|
|
48
|
-
name: "aba aaa",
|
|
49
|
-
age: 40,
|
|
50
|
-
tags: [],
|
|
51
|
-
nickname: null,
|
|
52
|
-
description: "world hello example"
|
|
53
|
-
};
|
|
54
|
-
const objects = [object1, object2, object3, object4];
|
|
55
|
-
it("properly handles startsWith", () => expect(filterObjects(objects, {
|
|
56
|
-
type: "startsWith",
|
|
57
|
-
field: "description",
|
|
58
|
-
value: "hello wor"
|
|
59
|
-
})).toEqual([object1]));
|
|
60
|
-
it("startsWith with single term prefix", () => expect(filterObjects(objects, {
|
|
61
|
-
type: "startsWith",
|
|
62
|
-
field: "description",
|
|
63
|
-
value: "hel"
|
|
64
|
-
})).toEqual([object1, object4]));
|
|
65
|
-
it("startsWith returns empty for non-string fields", () => expect(filterObjects(objects, {
|
|
66
|
-
type: "startsWith",
|
|
67
|
-
field: "age",
|
|
68
|
-
value: "25"
|
|
69
|
-
})).toEqual([]));
|
|
70
|
-
it("properly handles eq", () => expect(filterObjects(objects, {
|
|
71
|
-
type: "eq",
|
|
72
|
-
field: "age",
|
|
73
|
-
value: 25
|
|
74
|
-
})).toEqual([object1, object3]));
|
|
75
|
-
it("properly handles gt", () => expect(filterObjects(objects, {
|
|
76
|
-
type: "gt",
|
|
77
|
-
field: "age",
|
|
78
|
-
value: 25
|
|
79
|
-
})).toEqual([object2, object4]));
|
|
80
|
-
it("properly handles lt", () => expect(filterObjects(objects, {
|
|
81
|
-
type: "lt",
|
|
82
|
-
field: "age",
|
|
83
|
-
value: 30
|
|
84
|
-
})).toEqual([object1, object3]));
|
|
85
|
-
it("properly handles gte", () => expect(filterObjects(objects, {
|
|
86
|
-
type: "gte",
|
|
87
|
-
field: "age",
|
|
88
|
-
value: 30
|
|
89
|
-
})).toEqual([object2, object4]));
|
|
90
|
-
it("properly handles lte", () => expect(filterObjects(objects, {
|
|
91
|
-
type: "lte",
|
|
92
|
-
field: "age",
|
|
93
|
-
value: 25
|
|
94
|
-
})).toEqual([object1, object3]));
|
|
95
|
-
it("properly handles in", () => expect(filterObjects(objects, {
|
|
96
|
-
type: "in",
|
|
97
|
-
field: "age",
|
|
98
|
-
value: [25, 40]
|
|
99
|
-
})).toEqual([object1, object3, object4]));
|
|
100
|
-
it("properly handles contains for array fields", () => expect(filterObjects(objects, {
|
|
101
|
-
type: "contains",
|
|
102
|
-
field: "tags",
|
|
103
|
-
value: "red"
|
|
104
|
-
})).toEqual([object1, object3]));
|
|
105
|
-
it("contains returns empty for non-array fields", () => expect(filterObjects(objects, {
|
|
106
|
-
type: "contains",
|
|
107
|
-
field: "name",
|
|
108
|
-
value: "a"
|
|
109
|
-
})).toEqual([]));
|
|
110
|
-
it("properly handles and", () => expect(filterObjects(objects, {
|
|
111
|
-
type: "and",
|
|
112
|
-
value: [{
|
|
113
|
-
type: "eq",
|
|
114
|
-
field: "age",
|
|
115
|
-
value: 25
|
|
116
|
-
}, {
|
|
117
|
-
type: "startsWith",
|
|
118
|
-
field: "name",
|
|
119
|
-
value: "abc"
|
|
120
|
-
}]
|
|
121
|
-
})).toEqual([object1, object3]));
|
|
122
|
-
it("properly handles or", () => expect(filterObjects(objects, {
|
|
123
|
-
type: "or",
|
|
124
|
-
value: [{
|
|
125
|
-
type: "eq",
|
|
126
|
-
field: "age",
|
|
127
|
-
value: 40
|
|
128
|
-
}, {
|
|
129
|
-
type: "eq",
|
|
130
|
-
field: "name",
|
|
131
|
-
value: "abc"
|
|
132
|
-
}]
|
|
133
|
-
})).toEqual([object4, object1]));
|
|
134
|
-
it("properly handles not", () => expect(filterObjects(objects, {
|
|
135
|
-
type: "not",
|
|
136
|
-
value: {
|
|
137
|
-
type: "eq",
|
|
138
|
-
field: "age",
|
|
139
|
-
value: 25
|
|
140
|
-
}
|
|
141
|
-
})).toEqual([object2, object4]));
|
|
142
|
-
it("properly handles isNull with value true", () => expect(filterObjects(objects, {
|
|
143
|
-
type: "isNull",
|
|
144
|
-
field: "nickname",
|
|
145
|
-
value: true
|
|
146
|
-
})).toEqual([object1, object2, object4]));
|
|
147
|
-
it("properly handles isNull with value false", () => expect(filterObjects(objects, {
|
|
148
|
-
type: "isNull",
|
|
149
|
-
field: "nickname",
|
|
150
|
-
value: false
|
|
151
|
-
})).toEqual([object3]));
|
|
152
|
-
it("properly handles containsAnyTerm", () => expect(filterObjects(objects, {
|
|
153
|
-
type: "containsAnyTerm",
|
|
154
|
-
field: "description",
|
|
155
|
-
value: "hello foo"
|
|
156
|
-
})).toEqual([object1, object2, object4]));
|
|
157
|
-
it("containsAnyTerm is case insensitive", () => expect(filterObjects(objects, {
|
|
158
|
-
type: "containsAnyTerm",
|
|
159
|
-
field: "description",
|
|
160
|
-
value: "HELLO"
|
|
161
|
-
})).toEqual([object1, object4]));
|
|
162
|
-
it("containsAnyTerm returns empty for non-string fields", () => expect(filterObjects(objects, {
|
|
163
|
-
type: "containsAnyTerm",
|
|
164
|
-
field: "age",
|
|
165
|
-
value: "25"
|
|
166
|
-
})).toEqual([]));
|
|
167
|
-
it("properly handles containsAllTerms", () => expect(filterObjects(objects, {
|
|
168
|
-
type: "containsAllTerms",
|
|
169
|
-
field: "description",
|
|
170
|
-
value: "hello world"
|
|
171
|
-
})).toEqual([object1, object4]));
|
|
172
|
-
it("containsAllTerms is case insensitive", () => expect(filterObjects(objects, {
|
|
173
|
-
type: "containsAllTerms",
|
|
174
|
-
field: "description",
|
|
175
|
-
value: "HELLO WORLD"
|
|
176
|
-
})).toEqual([object1, object4]));
|
|
177
|
-
it("containsAllTerms returns empty for non-string fields", () => expect(filterObjects(objects, {
|
|
178
|
-
type: "containsAllTerms",
|
|
179
|
-
field: "age",
|
|
180
|
-
value: "25"
|
|
181
|
-
})).toEqual([]));
|
|
182
|
-
it("properly handles containsAllTermsInOrder", () => expect(filterObjects(objects, {
|
|
183
|
-
type: "containsAllTermsInOrder",
|
|
184
|
-
field: "description",
|
|
185
|
-
value: "hello world"
|
|
186
|
-
})).toEqual([object1]));
|
|
187
|
-
it("containsAllTermsInOrder returns empty for non-string fields", () => expect(filterObjects(objects, {
|
|
188
|
-
type: "containsAllTermsInOrder",
|
|
189
|
-
field: "age",
|
|
190
|
-
value: "25"
|
|
191
|
-
})).toEqual([]));
|
|
192
|
-
it("properly handles containsAllTermsInOrderPrefixLastTerm", () => expect(filterObjects(objects, {
|
|
193
|
-
type: "containsAllTermsInOrderPrefixLastTerm",
|
|
194
|
-
field: "description",
|
|
195
|
-
value: "hello wor"
|
|
196
|
-
})).toEqual([object1]));
|
|
197
|
-
it("containsAllTermsInOrderPrefixLastTerm with single term prefix", () => expect(filterObjects(objects, {
|
|
198
|
-
type: "containsAllTermsInOrderPrefixLastTerm",
|
|
199
|
-
field: "description",
|
|
200
|
-
value: "hel"
|
|
201
|
-
})).toEqual([object1, object4]));
|
|
202
|
-
it("containsAllTermsInOrderPrefixLastTerm returns empty for non-string fields", () => expect(filterObjects(objects, {
|
|
203
|
-
type: "containsAllTermsInOrderPrefixLastTerm",
|
|
204
|
-
field: "age",
|
|
205
|
-
value: "25"
|
|
206
|
-
})).toEqual([]));
|
|
207
|
-
it("throws for propertyIdentifier usage", () => expect(() => filterObjects(objects, {
|
|
208
|
-
type: "eq",
|
|
209
|
-
propertyIdentifier: {
|
|
210
|
-
type: "property",
|
|
211
|
-
apiName: "someId"
|
|
212
|
-
},
|
|
213
|
-
value: 25
|
|
214
|
-
})).toThrow("propertyIdentifier not supported"));
|
|
215
|
-
});
|
|
216
|
-
//# sourceMappingURL=filterObjects.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterObjects.test.js","names":["describe","expect","it","filterObjects","object1","__apiName","__primaryKey","name","age","tags","description","object2","object3","nickname","object4","objects","type","field","value","toEqual","propertyIdentifier","apiName","toThrow"],"sources":["filterObjects.test.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expect, it } from \"vitest\";\nimport { filterObjects } from \"./filterObjects.js\";\n\ndescribe(filterObjects, () => {\n const object1 = {\n __apiName: \"test-obj\",\n __primaryKey: \"1\",\n name: \"abc\",\n age: 25,\n tags: [\"red\", \"blue\"],\n description: \"hello world example\",\n };\n\n const object2 = {\n __apiName: \"test-obj\",\n __primaryKey: \"3\",\n name: \"cba abc\",\n age: 30,\n tags: [\"green\"],\n description: \"foo bar baz\",\n };\n\n const object3 = {\n __apiName: \"test-obj\",\n __primaryKey: \"2\",\n name: \"abcdef\",\n age: 25,\n tags: [\"red\", \"green\"],\n nickname: \"red green\",\n description: \"hi there friend\",\n };\n\n const object4 = {\n __apiName: \"test-obj\",\n __primaryKey: \"4\",\n name: \"aba aaa\",\n age: 40,\n tags: [],\n nickname: null,\n description: \"world hello example\",\n };\n\n const objects = [object1, object2, object3, object4];\n\n it(\"properly handles startsWith\", () =>\n expect(filterObjects(objects, {\n type: \"startsWith\",\n field: \"description\",\n value: \"hello wor\",\n })).toEqual([object1]));\n\n it(\"startsWith with single term prefix\", () =>\n expect(filterObjects(objects, {\n type: \"startsWith\",\n field: \"description\",\n value: \"hel\",\n })).toEqual([object1, object4]));\n\n it(\"startsWith returns empty for non-string fields\", () =>\n expect(filterObjects(objects, {\n type: \"startsWith\",\n field: \"age\",\n value: \"25\",\n })).toEqual([]));\n\n it(\"properly handles eq\", () =>\n expect(filterObjects(objects, {\n type: \"eq\",\n field: \"age\",\n value: 25,\n })).toEqual([object1, object3]));\n\n it(\"properly handles gt\", () =>\n expect(filterObjects(objects, {\n type: \"gt\",\n field: \"age\",\n value: 25,\n })).toEqual([object2, object4]));\n\n it(\"properly handles lt\", () =>\n expect(filterObjects(objects, {\n type: \"lt\",\n field: \"age\",\n value: 30,\n })).toEqual([object1, object3]));\n\n it(\"properly handles gte\", () =>\n expect(filterObjects(objects, {\n type: \"gte\",\n field: \"age\",\n value: 30,\n })).toEqual([object2, object4]));\n\n it(\"properly handles lte\", () =>\n expect(filterObjects(objects, {\n type: \"lte\",\n field: \"age\",\n value: 25,\n })).toEqual([object1, object3]));\n\n it(\"properly handles in\", () =>\n expect(filterObjects(objects, {\n type: \"in\",\n field: \"age\",\n value: [25, 40],\n })).toEqual([object1, object3, object4]));\n\n it(\"properly handles contains for array fields\", () =>\n expect(filterObjects(objects, {\n type: \"contains\",\n field: \"tags\",\n value: \"red\",\n })).toEqual([object1, object3]));\n\n it(\"contains returns empty for non-array fields\", () =>\n expect(filterObjects(objects, {\n type: \"contains\",\n field: \"name\",\n value: \"a\",\n })).toEqual([]));\n\n it(\"properly handles and\", () =>\n expect(filterObjects(objects, {\n type: \"and\",\n value: [\n { type: \"eq\", field: \"age\", value: 25 },\n { type: \"startsWith\", field: \"name\", value: \"abc\" },\n ],\n })).toEqual([object1, object3]));\n\n it(\"properly handles or\", () =>\n expect(filterObjects(objects, {\n type: \"or\",\n value: [\n { type: \"eq\", field: \"age\", value: 40 },\n { type: \"eq\", field: \"name\", value: \"abc\" },\n ],\n })).toEqual([object4, object1]));\n\n it(\"properly handles not\", () =>\n expect(filterObjects(objects, {\n type: \"not\",\n value: { type: \"eq\", field: \"age\", value: 25 },\n })).toEqual([object2, object4]));\n\n it(\"properly handles isNull with value true\", () =>\n expect(filterObjects(objects, {\n type: \"isNull\",\n field: \"nickname\",\n value: true,\n })).toEqual([object1, object2, object4]));\n\n it(\"properly handles isNull with value false\", () =>\n expect(filterObjects(objects, {\n type: \"isNull\",\n field: \"nickname\",\n value: false,\n })).toEqual([object3]));\n\n it(\"properly handles containsAnyTerm\", () =>\n expect(filterObjects(objects, {\n type: \"containsAnyTerm\",\n field: \"description\",\n value: \"hello foo\",\n })).toEqual([object1, object2, object4]));\n\n it(\"containsAnyTerm is case insensitive\", () =>\n expect(filterObjects(objects, {\n type: \"containsAnyTerm\",\n field: \"description\",\n value: \"HELLO\",\n })).toEqual([object1, object4]));\n\n it(\"containsAnyTerm returns empty for non-string fields\", () =>\n expect(filterObjects(objects, {\n type: \"containsAnyTerm\",\n field: \"age\",\n value: \"25\",\n })).toEqual([]));\n\n it(\"properly handles containsAllTerms\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTerms\",\n field: \"description\",\n value: \"hello world\",\n })).toEqual([object1, object4]));\n\n it(\"containsAllTerms is case insensitive\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTerms\",\n field: \"description\",\n value: \"HELLO WORLD\",\n })).toEqual([object1, object4]));\n\n it(\"containsAllTerms returns empty for non-string fields\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTerms\",\n field: \"age\",\n value: \"25\",\n })).toEqual([]));\n\n it(\"properly handles containsAllTermsInOrder\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTermsInOrder\",\n field: \"description\",\n value: \"hello world\",\n })).toEqual([object1]));\n\n it(\"containsAllTermsInOrder returns empty for non-string fields\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTermsInOrder\",\n field: \"age\",\n value: \"25\",\n })).toEqual([]));\n\n it(\"properly handles containsAllTermsInOrderPrefixLastTerm\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTermsInOrderPrefixLastTerm\",\n field: \"description\",\n value: \"hello wor\",\n })).toEqual([object1]));\n\n it(\"containsAllTermsInOrderPrefixLastTerm with single term prefix\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTermsInOrderPrefixLastTerm\",\n field: \"description\",\n value: \"hel\",\n })).toEqual([object1, object4]));\n\n it(\"containsAllTermsInOrderPrefixLastTerm returns empty for non-string fields\", () =>\n expect(filterObjects(objects, {\n type: \"containsAllTermsInOrderPrefixLastTerm\",\n field: \"age\",\n value: \"25\",\n })).toEqual([]));\n\n it(\"throws for propertyIdentifier usage\", () =>\n expect(() =>\n filterObjects(objects, {\n type: \"eq\",\n propertyIdentifier: { type: \"property\", apiName: \"someId\" },\n value: 25,\n })\n ).toThrow(\"propertyIdentifier not supported\"));\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;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,CAAC,CAAC,CAAC;EAElCZ,EAAE,CAAC,2EAA2E,EAAE,MAC9ED,MAAM,CAACE,aAAa,CAACY,OAAO,EAAE;IAC5BC,IAAI,EAAE,uCAAuC;IAC7CC,KAAK,EAAE,KAAK;IACZC,KAAK,EAAE;EACT,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,EAAE,CAAC,CAAC;EAElBjB,EAAE,CAAC,qCAAqC,EAAE,MACxCD,MAAM,CAAC,MACLE,aAAa,CAACY,OAAO,EAAE;IACrBC,IAAI,EAAE,IAAI;IACVI,kBAAkB,EAAE;MAAEJ,IAAI,EAAE,UAAU;MAAEK,OAAO,EAAE;IAAS,CAAC;IAC3DH,KAAK,EAAE;EACT,CAAC,CACH,CAAC,CAACI,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAClD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
18
|
-
import { filterTimeSeriesData } from "./filterTimeSeriesData.js";
|
|
19
|
-
|
|
20
|
-
/*
|
|
21
|
-
|
|
22
|
-
Client code looks like this:
|
|
23
|
-
|
|
24
|
-
return body.$before
|
|
25
|
-
? {
|
|
26
|
-
type: "relative",
|
|
27
|
-
startTime: {
|
|
28
|
-
when: "BEFORE",
|
|
29
|
-
value: body.$before,
|
|
30
|
-
unit: TimeseriesDurationMapping[body.$unit],
|
|
31
|
-
},
|
|
32
|
-
}
|
|
33
|
-
: {
|
|
34
|
-
type: "relative",
|
|
35
|
-
endTime: {
|
|
36
|
-
when: "AFTER",
|
|
37
|
-
value: body.$after!,
|
|
38
|
-
unit: TimeseriesDurationMapping[body.$unit],
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
and `{ $before: 7, $unit: "DAYS" }` should mean "start time is 7 days ago"
|
|
43
|
-
and `{ $after: 7, $unit: "DAYS" }` should mean "end time is 7 days from now"
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
describe(filterTimeSeriesData, () => {
|
|
47
|
-
beforeEach(() => {
|
|
48
|
-
vi.useFakeTimers({
|
|
49
|
-
now: new Date("2022-01-01T00:00:00Z")
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
afterEach(() => {
|
|
53
|
-
vi.useRealTimers();
|
|
54
|
-
});
|
|
55
|
-
it("properly handles $before", () => {
|
|
56
|
-
expect(filterTimeSeriesData([{
|
|
57
|
-
time: "2021-12-01T00:00:00Z",
|
|
58
|
-
value: 1
|
|
59
|
-
}, {
|
|
60
|
-
time: "2021-12-26T00:00:00Z",
|
|
61
|
-
value: 2
|
|
62
|
-
}, {
|
|
63
|
-
time: "2021-12-27T00:00:00Z",
|
|
64
|
-
value: 3
|
|
65
|
-
}], {
|
|
66
|
-
range: {
|
|
67
|
-
type: "relative",
|
|
68
|
-
startTime: {
|
|
69
|
-
when: "BEFORE",
|
|
70
|
-
value: 7,
|
|
71
|
-
unit: "DAYS"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
})).toEqual([{
|
|
75
|
-
time: "2021-12-26T00:00:00Z",
|
|
76
|
-
value: 2
|
|
77
|
-
}, {
|
|
78
|
-
time: "2021-12-27T00:00:00Z",
|
|
79
|
-
value: 3
|
|
80
|
-
}]);
|
|
81
|
-
});
|
|
82
|
-
it("properly handles $after", () => {
|
|
83
|
-
expect(filterTimeSeriesData([{
|
|
84
|
-
time: "2022-01-01T00:00:00Z",
|
|
85
|
-
value: 1
|
|
86
|
-
}, {
|
|
87
|
-
time: "2022-01-02T00:00:00Z",
|
|
88
|
-
value: 2
|
|
89
|
-
}, {
|
|
90
|
-
time: "2022-01-03T00:00:00Z",
|
|
91
|
-
value: 3
|
|
92
|
-
}, {
|
|
93
|
-
time: "2022-02-03T00:00:00Z",
|
|
94
|
-
value: 4
|
|
95
|
-
}], {
|
|
96
|
-
range: {
|
|
97
|
-
type: "relative",
|
|
98
|
-
endTime: {
|
|
99
|
-
when: "AFTER",
|
|
100
|
-
value: 7,
|
|
101
|
-
unit: "DAYS"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
})).toEqual([{
|
|
105
|
-
time: "2022-01-01T00:00:00Z",
|
|
106
|
-
value: 1
|
|
107
|
-
}, {
|
|
108
|
-
time: "2022-01-02T00:00:00Z",
|
|
109
|
-
value: 2
|
|
110
|
-
}, {
|
|
111
|
-
time: "2022-01-03T00:00:00Z",
|
|
112
|
-
value: 3
|
|
113
|
-
}]);
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
//# sourceMappingURL=filterTimeSeriesData.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterTimeSeriesData.test.js","names":["afterEach","beforeEach","describe","expect","it","vi","filterTimeSeriesData","useFakeTimers","now","Date","useRealTimers","time","value","range","type","startTime","when","unit","toEqual","endTime"],"sources":["filterTimeSeriesData.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { afterEach, beforeEach, describe, expect, it, vi } from \"vitest\";\nimport { filterTimeSeriesData } from \"./filterTimeSeriesData.js\";\n\n/*\n\nClient code looks like this:\n\n return body.$before\n ? {\n type: \"relative\",\n startTime: {\n when: \"BEFORE\",\n value: body.$before,\n unit: TimeseriesDurationMapping[body.$unit],\n },\n }\n : {\n type: \"relative\",\n endTime: {\n when: \"AFTER\",\n value: body.$after!,\n unit: TimeseriesDurationMapping[body.$unit],\n },\n };\n\nand `{ $before: 7, $unit: \"DAYS\" }` should mean \"start time is 7 days ago\"\nand `{ $after: 7, $unit: \"DAYS\" }` should mean \"end time is 7 days from now\"\n*/\n\ndescribe(filterTimeSeriesData, () => {\n beforeEach(() => {\n vi.useFakeTimers({\n now: new Date(\"2022-01-01T00:00:00Z\"),\n });\n });\n\n afterEach(() => {\n vi.useRealTimers();\n });\n it(\"properly handles $before\", () => {\n expect(filterTimeSeriesData([\n { time: \"2021-12-01T00:00:00Z\", value: 1 },\n { time: \"2021-12-26T00:00:00Z\", value: 2 },\n { time: \"2021-12-27T00:00:00Z\", value: 3 },\n ], {\n range: {\n type: \"relative\",\n startTime: {\n when: \"BEFORE\",\n value: 7,\n unit: \"DAYS\",\n },\n },\n })).toEqual([\n { time: \"2021-12-26T00:00:00Z\", value: 2 },\n { time: \"2021-12-27T00:00:00Z\", value: 3 },\n ]);\n });\n\n it(\"properly handles $after\", () => {\n expect(filterTimeSeriesData([\n { time: \"2022-01-01T00:00:00Z\", value: 1 },\n { time: \"2022-01-02T00:00:00Z\", value: 2 },\n { time: \"2022-01-03T00:00:00Z\", value: 3 },\n { time: \"2022-02-03T00:00:00Z\", value: 4 },\n ], {\n range: {\n type: \"relative\",\n endTime: {\n when: \"AFTER\",\n value: 7,\n unit: \"DAYS\",\n },\n },\n })).toEqual([\n { time: \"2022-01-01T00:00:00Z\", value: 1 },\n { time: \"2022-01-02T00:00:00Z\", value: 2 },\n { time: \"2022-01-03T00:00:00Z\", value: 3 },\n ]);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,EAAE,QAAQ,QAAQ;AACxE,SAASC,oBAAoB,QAAQ,2BAA2B;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAJ,QAAQ,CAACI,oBAAoB,EAAE,MAAM;EACnCL,UAAU,CAAC,MAAM;IACfI,EAAE,CAACE,aAAa,CAAC;MACfC,GAAG,EAAE,IAAIC,IAAI,CAAC,sBAAsB;IACtC,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFT,SAAS,CAAC,MAAM;IACdK,EAAE,CAACK,aAAa,CAAC,CAAC;EACpB,CAAC,CAAC;EACFN,EAAE,CAAC,0BAA0B,EAAE,MAAM;IACnCD,MAAM,CAACG,oBAAoB,CAAC,CAC1B;MAAEK,IAAI,EAAE,sBAAsB;MAAEC,KAAK,EAAE;IAAE,CAAC,EAC1C;MAAED,IAAI,EAAE,sBAAsB;MAAEC,KAAK,EAAE;IAAE,CAAC,EAC1C;MAAED,IAAI,EAAE,sBAAsB;MAAEC,KAAK,EAAE;IAAE,CAAC,CAC3C,EAAE;MACDC,KAAK,EAAE;QACLC,IAAI,EAAE,UAAU;QAChBC,SAAS,EAAE;UACTC,IAAI,EAAE,QAAQ;UACdJ,KAAK,EAAE,CAAC;UACRK,IAAI,EAAE;QACR;MACF;IACF,CAAC,CAAC,CAAC,CAACC,OAAO,CAAC,CACV;MAAEP,IAAI,EAAE,sBAAsB;MAA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