@wordpress/abilities 0.1.1-next.dc3f6d3c1.0 → 0.2.1-next.8b30e05b0.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/CHANGELOG.md +2 -0
- package/build-types/store/index.d.ts +1 -1
- package/build-types/store/index.d.ts.map +1 -1
- package/package.json +18 -9
- package/build/store/tests/actions.test.js +0 -792
- package/build/store/tests/actions.test.js.map +0 -7
- package/build/store/tests/reducer.test.js +0 -743
- package/build/store/tests/reducer.test.js.map +0 -7
- package/build/store/tests/resolvers.test.js +0 -520
- package/build/store/tests/resolvers.test.js.map +0 -7
- package/build/store/tests/selectors.test.js +0 -349
- package/build/store/tests/selectors.test.js.map +0 -7
- package/build/tests/api.test.js +0 -546
- package/build/tests/api.test.js.map +0 -7
- package/build/tests/validation.test.js +0 -453
- package/build/tests/validation.test.js.map +0 -7
- package/build-module/store/tests/actions.test.js +0 -804
- package/build-module/store/tests/actions.test.js.map +0 -7
- package/build-module/store/tests/reducer.test.js +0 -726
- package/build-module/store/tests/reducer.test.js.map +0 -7
- package/build-module/store/tests/resolvers.test.js +0 -523
- package/build-module/store/tests/resolvers.test.js.map +0 -7
- package/build-module/store/tests/selectors.test.js +0 -352
- package/build-module/store/tests/selectors.test.js.map +0 -7
- package/build-module/tests/api.test.js +0 -530
- package/build-module/tests/api.test.js.map +0 -7
- package/build-module/tests/validation.test.js +0 -451
- package/build-module/tests/validation.test.js.map +0 -7
|
@@ -1,451 +0,0 @@
|
|
|
1
|
-
// packages/abilities/src/tests/validation.test.ts
|
|
2
|
-
import { validateValueFromSchema } from "../validation";
|
|
3
|
-
describe("validateValueFromSchema", () => {
|
|
4
|
-
describe("type validation", () => {
|
|
5
|
-
it("should validate string type", () => {
|
|
6
|
-
const schema = { type: "string" };
|
|
7
|
-
expect(validateValueFromSchema("hello", schema)).toBe(true);
|
|
8
|
-
expect(validateValueFromSchema(123, schema)).toBe(
|
|
9
|
-
" is not of type string."
|
|
10
|
-
);
|
|
11
|
-
});
|
|
12
|
-
it("should validate number type", () => {
|
|
13
|
-
const schema = { type: "number" };
|
|
14
|
-
expect(validateValueFromSchema(123, schema)).toBe(true);
|
|
15
|
-
expect(validateValueFromSchema(45.67, schema)).toBe(true);
|
|
16
|
-
expect(validateValueFromSchema("hello", schema)).toBe(
|
|
17
|
-
" is not of type number."
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
it("should validate boolean type", () => {
|
|
21
|
-
const schema = { type: "boolean" };
|
|
22
|
-
expect(validateValueFromSchema(true, schema)).toBe(true);
|
|
23
|
-
expect(validateValueFromSchema(false, schema)).toBe(true);
|
|
24
|
-
expect(validateValueFromSchema("true", schema)).toBe(
|
|
25
|
-
" is not of type boolean."
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
it("should validate array type", () => {
|
|
29
|
-
const schema = { type: "array" };
|
|
30
|
-
expect(validateValueFromSchema([1, 2, 3], schema)).toBe(
|
|
31
|
-
true
|
|
32
|
-
);
|
|
33
|
-
expect(validateValueFromSchema({}, schema)).toBe(
|
|
34
|
-
" is not of type array."
|
|
35
|
-
);
|
|
36
|
-
});
|
|
37
|
-
it("should validate object type", () => {
|
|
38
|
-
const schema = { type: "object" };
|
|
39
|
-
expect(validateValueFromSchema({ a: 1 }, schema)).toBe(true);
|
|
40
|
-
expect(validateValueFromSchema([], schema)).toBe(
|
|
41
|
-
" is not of type object."
|
|
42
|
-
);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
describe("object validation", () => {
|
|
46
|
-
it("should validate required properties", () => {
|
|
47
|
-
const schema = {
|
|
48
|
-
type: "object",
|
|
49
|
-
properties: {
|
|
50
|
-
name: { type: "string" },
|
|
51
|
-
age: { type: "number" }
|
|
52
|
-
},
|
|
53
|
-
required: ["name"]
|
|
54
|
-
};
|
|
55
|
-
expect(
|
|
56
|
-
validateValueFromSchema({ name: "John", age: 30 }, schema)
|
|
57
|
-
).toBe(true);
|
|
58
|
-
expect(validateValueFromSchema({ name: "John" }, schema)).toBe(
|
|
59
|
-
true
|
|
60
|
-
);
|
|
61
|
-
expect(validateValueFromSchema({ age: 30 }, schema)).toBe(
|
|
62
|
-
"name is a required property of ."
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
it("should validate nested objects", () => {
|
|
66
|
-
const schema = {
|
|
67
|
-
type: "object",
|
|
68
|
-
properties: {
|
|
69
|
-
user: {
|
|
70
|
-
type: "object",
|
|
71
|
-
properties: {
|
|
72
|
-
name: { type: "string" }
|
|
73
|
-
},
|
|
74
|
-
required: ["name"]
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
expect(
|
|
79
|
-
validateValueFromSchema({ user: { name: "John" } }, schema)
|
|
80
|
-
).toBe(true);
|
|
81
|
-
expect(validateValueFromSchema({ user: {} }, schema)).toBe(
|
|
82
|
-
"name is a required property of [user]."
|
|
83
|
-
);
|
|
84
|
-
});
|
|
85
|
-
it("should validate additionalProperties: false", () => {
|
|
86
|
-
const schema = {
|
|
87
|
-
type: "object",
|
|
88
|
-
properties: {
|
|
89
|
-
name: { type: "string" }
|
|
90
|
-
},
|
|
91
|
-
additionalProperties: false
|
|
92
|
-
};
|
|
93
|
-
expect(validateValueFromSchema({ name: "John" }, schema)).toBe(
|
|
94
|
-
true
|
|
95
|
-
);
|
|
96
|
-
expect(
|
|
97
|
-
validateValueFromSchema(
|
|
98
|
-
{ name: "John", extra: "value" },
|
|
99
|
-
schema
|
|
100
|
-
)
|
|
101
|
-
).toBe("extra is not a valid property of Object.");
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
describe("array validation", () => {
|
|
105
|
-
it("should validate array items", () => {
|
|
106
|
-
const schema = {
|
|
107
|
-
type: "array",
|
|
108
|
-
items: { type: "number" }
|
|
109
|
-
};
|
|
110
|
-
expect(validateValueFromSchema([1, 2, 3], schema)).toBe(
|
|
111
|
-
true
|
|
112
|
-
);
|
|
113
|
-
expect(validateValueFromSchema([1, "two", 3], schema)).toBe(
|
|
114
|
-
"[1] is not of type number."
|
|
115
|
-
);
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
describe("edge cases", () => {
|
|
119
|
-
it("should pass validation when empty schema provided", () => {
|
|
120
|
-
const consoleSpy = jest.spyOn(console, "warn").mockImplementation();
|
|
121
|
-
expect(validateValueFromSchema("anything", {})).toBe(true);
|
|
122
|
-
expect(consoleSpy).toHaveBeenCalledWith(
|
|
123
|
-
'The "type" schema keyword for value is required.'
|
|
124
|
-
);
|
|
125
|
-
consoleSpy.mockRestore();
|
|
126
|
-
});
|
|
127
|
-
it("should warn when type is missing but still pass validation", () => {
|
|
128
|
-
const consoleSpy = jest.spyOn(console, "warn").mockImplementation();
|
|
129
|
-
const schema = { properties: { name: { type: "string" } } };
|
|
130
|
-
const result = validateValueFromSchema({ name: "test" }, schema);
|
|
131
|
-
expect(result).toBe(true);
|
|
132
|
-
expect(consoleSpy).toHaveBeenCalledWith(
|
|
133
|
-
'The "type" schema keyword for value is required.'
|
|
134
|
-
);
|
|
135
|
-
consoleSpy.mockRestore();
|
|
136
|
-
});
|
|
137
|
-
it("should include param name in warning when provided", () => {
|
|
138
|
-
const consoleSpy = jest.spyOn(console, "warn").mockImplementation();
|
|
139
|
-
const schema = { format: "email" };
|
|
140
|
-
const result = validateValueFromSchema(
|
|
141
|
-
"test@example.com",
|
|
142
|
-
schema,
|
|
143
|
-
"email_field"
|
|
144
|
-
);
|
|
145
|
-
expect(result).toBe(true);
|
|
146
|
-
expect(consoleSpy).toHaveBeenCalledWith(
|
|
147
|
-
'The "type" schema keyword for email_field is required.'
|
|
148
|
-
);
|
|
149
|
-
consoleSpy.mockRestore();
|
|
150
|
-
});
|
|
151
|
-
it("should handle null values correctly", () => {
|
|
152
|
-
const schema = { type: ["string", "null"] };
|
|
153
|
-
expect(validateValueFromSchema(null, schema)).toBe(true);
|
|
154
|
-
expect(validateValueFromSchema("hello", schema)).toBe(true);
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
describe("AI-relevant format validation", () => {
|
|
158
|
-
it("should validate email format", () => {
|
|
159
|
-
const schema = { type: "string", format: "email" };
|
|
160
|
-
expect(
|
|
161
|
-
validateValueFromSchema("user@example.com", schema)
|
|
162
|
-
).toBe(true);
|
|
163
|
-
expect(validateValueFromSchema("invalid-email", schema)).toBe(
|
|
164
|
-
"Invalid email address."
|
|
165
|
-
);
|
|
166
|
-
});
|
|
167
|
-
it("should validate date-time format", () => {
|
|
168
|
-
const schema = { type: "string", format: "date-time" };
|
|
169
|
-
expect(
|
|
170
|
-
validateValueFromSchema("2024-01-15T10:30:00Z", schema)
|
|
171
|
-
).toBe(true);
|
|
172
|
-
expect(
|
|
173
|
-
validateValueFromSchema("2024-01-15T10:30:00.123Z", schema)
|
|
174
|
-
).toBe(true);
|
|
175
|
-
expect(validateValueFromSchema("not-a-date", schema)).toBe(
|
|
176
|
-
"Invalid date."
|
|
177
|
-
);
|
|
178
|
-
});
|
|
179
|
-
it("should validate UUID format", () => {
|
|
180
|
-
const schema = { type: "string", format: "uuid" };
|
|
181
|
-
expect(
|
|
182
|
-
validateValueFromSchema(
|
|
183
|
-
"123e4567-e89b-12d3-a456-426614174000",
|
|
184
|
-
schema
|
|
185
|
-
)
|
|
186
|
-
).toBe(true);
|
|
187
|
-
expect(validateValueFromSchema("not-a-uuid", schema)).toBe(
|
|
188
|
-
" is not a valid UUID."
|
|
189
|
-
);
|
|
190
|
-
});
|
|
191
|
-
it("should validate IPv4 format", () => {
|
|
192
|
-
const schema = { type: "string", format: "ipv4" };
|
|
193
|
-
expect(validateValueFromSchema("192.168.1.1", schema)).toBe(
|
|
194
|
-
true
|
|
195
|
-
);
|
|
196
|
-
expect(validateValueFromSchema("256.256.256.256", schema)).toBe(
|
|
197
|
-
" is not a valid IP address."
|
|
198
|
-
);
|
|
199
|
-
});
|
|
200
|
-
it("should validate hostname format", () => {
|
|
201
|
-
const schema = { type: "string", format: "hostname" };
|
|
202
|
-
expect(validateValueFromSchema("example.com", schema)).toBe(
|
|
203
|
-
true
|
|
204
|
-
);
|
|
205
|
-
expect(validateValueFromSchema("sub.example.com", schema)).toBe(
|
|
206
|
-
true
|
|
207
|
-
);
|
|
208
|
-
expect(validateValueFromSchema("not a hostname!", schema)).toBe(
|
|
209
|
-
" is not a valid hostname."
|
|
210
|
-
);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
describe("pattern validation", () => {
|
|
214
|
-
it("should validate string patterns", () => {
|
|
215
|
-
const schema = { type: "string", pattern: "^[A-Z][a-z]+$" };
|
|
216
|
-
expect(validateValueFromSchema("Hello", schema)).toBe(true);
|
|
217
|
-
expect(validateValueFromSchema("hello", schema)).toBe(
|
|
218
|
-
" does not match pattern ^[A-Z][a-z]+$."
|
|
219
|
-
);
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
describe("number constraints", () => {
|
|
223
|
-
it("should validate minimum and maximum", () => {
|
|
224
|
-
const schema = { type: "number", minimum: 0, maximum: 100 };
|
|
225
|
-
expect(validateValueFromSchema(50, schema)).toBe(true);
|
|
226
|
-
expect(validateValueFromSchema(0, schema)).toBe(true);
|
|
227
|
-
expect(validateValueFromSchema(100, schema)).toBe(true);
|
|
228
|
-
expect(validateValueFromSchema(-1, schema)).toBe(
|
|
229
|
-
" must be greater than or equal to 0"
|
|
230
|
-
);
|
|
231
|
-
expect(validateValueFromSchema(101, schema)).toBe(
|
|
232
|
-
" must be less than or equal to 100"
|
|
233
|
-
);
|
|
234
|
-
});
|
|
235
|
-
it("should validate multipleOf", () => {
|
|
236
|
-
const schema = { type: "number", multipleOf: 5 };
|
|
237
|
-
expect(validateValueFromSchema(10, schema)).toBe(true);
|
|
238
|
-
expect(validateValueFromSchema(15, schema)).toBe(true);
|
|
239
|
-
expect(validateValueFromSchema(7, schema)).toBe(
|
|
240
|
-
" must be a multiple of 5."
|
|
241
|
-
);
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
describe("enum validation", () => {
|
|
245
|
-
it("should validate enum values", () => {
|
|
246
|
-
const schema = {
|
|
247
|
-
type: "string",
|
|
248
|
-
enum: ["read", "write", "execute"]
|
|
249
|
-
};
|
|
250
|
-
expect(validateValueFromSchema("read", schema)).toBe(true);
|
|
251
|
-
expect(validateValueFromSchema("delete", schema)).toBe(
|
|
252
|
-
" is not one of read, write, execute."
|
|
253
|
-
);
|
|
254
|
-
});
|
|
255
|
-
});
|
|
256
|
-
describe("anyOf validation", () => {
|
|
257
|
-
it("should validate anyOf schemas", () => {
|
|
258
|
-
const schema = {
|
|
259
|
-
anyOf: [{ type: "string" }, { type: "number" }]
|
|
260
|
-
};
|
|
261
|
-
expect(validateValueFromSchema("hello", schema)).toBe(true);
|
|
262
|
-
expect(validateValueFromSchema(42, schema)).toBe(true);
|
|
263
|
-
expect(validateValueFromSchema(true, schema)).toBe(
|
|
264
|
-
" is invalid (failed anyOf validation)."
|
|
265
|
-
);
|
|
266
|
-
});
|
|
267
|
-
});
|
|
268
|
-
describe("strict JSON validation (no type coercion)", () => {
|
|
269
|
-
it('should NOT coerce string "true" to boolean', () => {
|
|
270
|
-
const schema = { type: "boolean" };
|
|
271
|
-
expect(validateValueFromSchema(true, schema)).toBe(true);
|
|
272
|
-
expect(validateValueFromSchema(false, schema)).toBe(true);
|
|
273
|
-
expect(validateValueFromSchema("true", schema)).toBe(
|
|
274
|
-
" is not of type boolean."
|
|
275
|
-
);
|
|
276
|
-
expect(validateValueFromSchema("1", schema)).toBe(
|
|
277
|
-
" is not of type boolean."
|
|
278
|
-
);
|
|
279
|
-
});
|
|
280
|
-
it("should NOT accept empty string as object", () => {
|
|
281
|
-
const schema = { type: "object" };
|
|
282
|
-
expect(validateValueFromSchema({}, schema)).toBe(true);
|
|
283
|
-
expect(validateValueFromSchema("", schema)).toBe(
|
|
284
|
-
" is not of type object."
|
|
285
|
-
);
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
describe("string length constraints", () => {
|
|
289
|
-
it("should validate minLength constraint", () => {
|
|
290
|
-
const schema = { type: "string", minLength: 3 };
|
|
291
|
-
expect(validateValueFromSchema("hello", schema)).toBe(true);
|
|
292
|
-
expect(validateValueFromSchema("hi", schema)).toBe(
|
|
293
|
-
" must be at least 3 characters long."
|
|
294
|
-
);
|
|
295
|
-
});
|
|
296
|
-
it("should validate maxLength constraint", () => {
|
|
297
|
-
const schema = { type: "string", maxLength: 5 };
|
|
298
|
-
expect(validateValueFromSchema("hello", schema)).toBe(true);
|
|
299
|
-
expect(validateValueFromSchema("hello world", schema)).toBe(
|
|
300
|
-
" must be at most 5 characters long."
|
|
301
|
-
);
|
|
302
|
-
});
|
|
303
|
-
it("should handle singular character in length messages", () => {
|
|
304
|
-
const minSchema = { type: "string", minLength: 1 };
|
|
305
|
-
expect(validateValueFromSchema("", minSchema)).toBe(
|
|
306
|
-
" must be at least 1 character long."
|
|
307
|
-
);
|
|
308
|
-
const maxSchema = { type: "string", maxLength: 1 };
|
|
309
|
-
expect(validateValueFromSchema("ab", maxSchema)).toBe(
|
|
310
|
-
" must be at most 1 character long."
|
|
311
|
-
);
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
describe("array item constraints", () => {
|
|
315
|
-
it("should validate minItems constraint", () => {
|
|
316
|
-
const schema = { type: "array", minItems: 2 };
|
|
317
|
-
expect(validateValueFromSchema([1, 2, 3], schema)).toBe(
|
|
318
|
-
true
|
|
319
|
-
);
|
|
320
|
-
expect(validateValueFromSchema([1], schema)).toBe(
|
|
321
|
-
" must contain at least 2 items."
|
|
322
|
-
);
|
|
323
|
-
});
|
|
324
|
-
it("should validate maxItems constraint", () => {
|
|
325
|
-
const schema = { type: "array", maxItems: 3 };
|
|
326
|
-
expect(validateValueFromSchema([1, 2, 3], schema)).toBe(
|
|
327
|
-
true
|
|
328
|
-
);
|
|
329
|
-
expect(validateValueFromSchema([1, 2, 3, 4], schema)).toBe(
|
|
330
|
-
" must contain at most 3 items."
|
|
331
|
-
);
|
|
332
|
-
});
|
|
333
|
-
it("should validate uniqueItems constraint", () => {
|
|
334
|
-
const schema = { type: "array", uniqueItems: true };
|
|
335
|
-
expect(validateValueFromSchema([1, 2, 3], schema)).toBe(
|
|
336
|
-
true
|
|
337
|
-
);
|
|
338
|
-
expect(validateValueFromSchema([1, 2, 2, 3], schema)).toBe(
|
|
339
|
-
" has duplicate items."
|
|
340
|
-
);
|
|
341
|
-
});
|
|
342
|
-
it("should handle singular item in item messages", () => {
|
|
343
|
-
const minSchema = { type: "array", minItems: 1 };
|
|
344
|
-
expect(validateValueFromSchema([], minSchema)).toBe(
|
|
345
|
-
" must contain at least 1 item."
|
|
346
|
-
);
|
|
347
|
-
const maxSchema = { type: "array", maxItems: 1 };
|
|
348
|
-
expect(validateValueFromSchema([1, 2], maxSchema)).toBe(
|
|
349
|
-
" must contain at most 1 item."
|
|
350
|
-
);
|
|
351
|
-
});
|
|
352
|
-
});
|
|
353
|
-
describe("object property constraints", () => {
|
|
354
|
-
it("should validate minProperties constraint", () => {
|
|
355
|
-
const schema = { type: "object", minProperties: 2 };
|
|
356
|
-
expect(validateValueFromSchema({ a: 1, b: 2 }, schema)).toBe(
|
|
357
|
-
true
|
|
358
|
-
);
|
|
359
|
-
expect(validateValueFromSchema({ a: 1 }, schema)).toBe(
|
|
360
|
-
" must contain at least 2 properties."
|
|
361
|
-
);
|
|
362
|
-
});
|
|
363
|
-
it("should validate maxProperties constraint", () => {
|
|
364
|
-
const schema = { type: "object", maxProperties: 2 };
|
|
365
|
-
expect(validateValueFromSchema({ a: 1, b: 2 }, schema)).toBe(
|
|
366
|
-
true
|
|
367
|
-
);
|
|
368
|
-
expect(
|
|
369
|
-
validateValueFromSchema({ a: 1, b: 2, c: 3 }, schema)
|
|
370
|
-
).toBe(" must contain at most 2 properties.");
|
|
371
|
-
});
|
|
372
|
-
it("should handle singular property in property messages", () => {
|
|
373
|
-
const minSchema = { type: "object", minProperties: 1 };
|
|
374
|
-
expect(validateValueFromSchema({}, minSchema)).toBe(
|
|
375
|
-
" must contain at least 1 property."
|
|
376
|
-
);
|
|
377
|
-
const maxSchema = { type: "object", maxProperties: 1 };
|
|
378
|
-
expect(validateValueFromSchema({ a: 1, b: 2 }, maxSchema)).toBe(
|
|
379
|
-
" must contain at most 1 property."
|
|
380
|
-
);
|
|
381
|
-
});
|
|
382
|
-
});
|
|
383
|
-
describe("schema edge cases and errors", () => {
|
|
384
|
-
it("should handle empty schema object as valid but warn about missing type", () => {
|
|
385
|
-
const consoleSpy = jest.spyOn(console, "warn").mockImplementation();
|
|
386
|
-
expect(validateValueFromSchema("anything", {})).toBe(true);
|
|
387
|
-
expect(consoleSpy).toHaveBeenCalledWith(
|
|
388
|
-
'The "type" schema keyword for value is required.'
|
|
389
|
-
);
|
|
390
|
-
consoleSpy.mockRestore();
|
|
391
|
-
});
|
|
392
|
-
it("should warn for invalid schema types but still pass validation", () => {
|
|
393
|
-
const consoleSpy = jest.spyOn(console, "warn").mockImplementation();
|
|
394
|
-
expect(
|
|
395
|
-
validateValueFromSchema(
|
|
396
|
-
"anything",
|
|
397
|
-
void 0
|
|
398
|
-
)
|
|
399
|
-
).toBe(true);
|
|
400
|
-
expect(consoleSpy).toHaveBeenCalledWith(
|
|
401
|
-
"Schema must be an object. Received undefined."
|
|
402
|
-
);
|
|
403
|
-
consoleSpy.mockClear();
|
|
404
|
-
expect(
|
|
405
|
-
validateValueFromSchema(
|
|
406
|
-
123,
|
|
407
|
-
null
|
|
408
|
-
)
|
|
409
|
-
).toBe(true);
|
|
410
|
-
expect(consoleSpy).toHaveBeenCalledWith(
|
|
411
|
-
"Schema must be an object. Received object."
|
|
412
|
-
// typeof null === 'object'
|
|
413
|
-
);
|
|
414
|
-
consoleSpy.mockClear();
|
|
415
|
-
expect(
|
|
416
|
-
validateValueFromSchema(
|
|
417
|
-
true,
|
|
418
|
-
false
|
|
419
|
-
)
|
|
420
|
-
).toBe(true);
|
|
421
|
-
expect(consoleSpy).toHaveBeenCalledWith(
|
|
422
|
-
"Schema must be an object. Received boolean."
|
|
423
|
-
);
|
|
424
|
-
consoleSpy.mockRestore();
|
|
425
|
-
});
|
|
426
|
-
it("should handle schema compilation errors", () => {
|
|
427
|
-
const invalidSchema = { type: "invalid-type" };
|
|
428
|
-
const consoleErrorSpy = jest.spyOn(console, "error").mockImplementation();
|
|
429
|
-
const result = validateValueFromSchema("test", invalidSchema);
|
|
430
|
-
expect(result).toBe("Invalid schema provided for validation.");
|
|
431
|
-
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
432
|
-
"Schema compilation error:",
|
|
433
|
-
expect.any(Error)
|
|
434
|
-
);
|
|
435
|
-
consoleErrorSpy.mockRestore();
|
|
436
|
-
});
|
|
437
|
-
it("should handle const validation keyword", () => {
|
|
438
|
-
const schema = {
|
|
439
|
-
type: "string",
|
|
440
|
-
const: "exact-value"
|
|
441
|
-
};
|
|
442
|
-
expect(validateValueFromSchema("exact-value", schema)).toBe(
|
|
443
|
-
true
|
|
444
|
-
);
|
|
445
|
-
expect(validateValueFromSchema("different-value", schema)).toBe(
|
|
446
|
-
"must be equal to constant"
|
|
447
|
-
);
|
|
448
|
-
});
|
|
449
|
-
});
|
|
450
|
-
});
|
|
451
|
-
//# sourceMappingURL=validation.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/tests/validation.test.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Tests for schema validation utilities.\n */\n\n/**\n * Internal dependencies\n */\nimport { validateValueFromSchema } from '../validation';\n\ndescribe( 'validateValueFromSchema', () => {\n\tdescribe( 'type validation', () => {\n\t\tit( 'should validate string type', () => {\n\t\t\tconst schema = { type: 'string' };\n\t\t\texpect( validateValueFromSchema( 'hello', schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 123, schema ) ).toBe(\n\t\t\t\t' is not of type string.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate number type', () => {\n\t\t\tconst schema = { type: 'number' };\n\t\t\texpect( validateValueFromSchema( 123, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 45.67, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'hello', schema ) ).toBe(\n\t\t\t\t' is not of type number.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate boolean type', () => {\n\t\t\tconst schema = { type: 'boolean' };\n\t\t\texpect( validateValueFromSchema( true, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( false, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'true', schema ) ).toBe(\n\t\t\t\t' is not of type boolean.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate array type', () => {\n\t\t\tconst schema = { type: 'array' };\n\t\t\texpect( validateValueFromSchema( [ 1, 2, 3 ], schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( {}, schema ) ).toBe(\n\t\t\t\t' is not of type array.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate object type', () => {\n\t\t\tconst schema = { type: 'object' };\n\t\t\texpect( validateValueFromSchema( { a: 1 }, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( [], schema ) ).toBe(\n\t\t\t\t' is not of type object.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'object validation', () => {\n\t\tit( 'should validate required properties', () => {\n\t\t\tconst schema = {\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {\n\t\t\t\t\tname: { type: 'string' },\n\t\t\t\t\tage: { type: 'number' },\n\t\t\t\t},\n\t\t\t\trequired: [ 'name' ],\n\t\t\t};\n\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema( { name: 'John', age: 30 }, schema )\n\t\t\t).toBe( true );\n\t\t\texpect( validateValueFromSchema( { name: 'John' }, schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( { age: 30 }, schema ) ).toBe(\n\t\t\t\t'name is a required property of .'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate nested objects', () => {\n\t\t\tconst schema = {\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {\n\t\t\t\t\tuser: {\n\t\t\t\t\t\ttype: 'object',\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tname: { type: 'string' },\n\t\t\t\t\t\t},\n\t\t\t\t\t\trequired: [ 'name' ],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema( { user: { name: 'John' } }, schema )\n\t\t\t).toBe( true );\n\t\t\texpect( validateValueFromSchema( { user: {} }, schema ) ).toBe(\n\t\t\t\t'name is a required property of [user].'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate additionalProperties: false', () => {\n\t\t\tconst schema = {\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {\n\t\t\t\t\tname: { type: 'string' },\n\t\t\t\t},\n\t\t\t\tadditionalProperties: false,\n\t\t\t};\n\n\t\t\texpect( validateValueFromSchema( { name: 'John' }, schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema(\n\t\t\t\t\t{ name: 'John', extra: 'value' },\n\t\t\t\t\tschema\n\t\t\t\t)\n\t\t\t).toBe( 'extra is not a valid property of Object.' );\n\t\t} );\n\t} );\n\n\tdescribe( 'array validation', () => {\n\t\tit( 'should validate array items', () => {\n\t\t\tconst schema = {\n\t\t\t\ttype: 'array',\n\t\t\t\titems: { type: 'number' },\n\t\t\t};\n\n\t\t\texpect( validateValueFromSchema( [ 1, 2, 3 ], schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( [ 1, 'two', 3 ], schema ) ).toBe(\n\t\t\t\t'[1] is not of type number.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'edge cases', () => {\n\t\tit( 'should pass validation when empty schema provided', () => {\n\t\t\tconst consoleSpy = jest\n\t\t\t\t.spyOn( console, 'warn' )\n\t\t\t\t.mockImplementation();\n\n\t\t\texpect( validateValueFromSchema( 'anything', {} ) ).toBe( true );\n\t\t\texpect( consoleSpy ).toHaveBeenCalledWith(\n\t\t\t\t'The \"type\" schema keyword for value is required.'\n\t\t\t);\n\n\t\t\tconsoleSpy.mockRestore();\n\t\t} );\n\n\t\tit( 'should warn when type is missing but still pass validation', () => {\n\t\t\tconst consoleSpy = jest\n\t\t\t\t.spyOn( console, 'warn' )\n\t\t\t\t.mockImplementation();\n\t\t\tconst schema = { properties: { name: { type: 'string' } } };\n\t\t\tconst result = validateValueFromSchema( { name: 'test' }, schema );\n\n\t\t\texpect( result ).toBe( true );\n\t\t\texpect( consoleSpy ).toHaveBeenCalledWith(\n\t\t\t\t'The \"type\" schema keyword for value is required.'\n\t\t\t);\n\n\t\t\tconsoleSpy.mockRestore();\n\t\t} );\n\n\t\tit( 'should include param name in warning when provided', () => {\n\t\t\tconst consoleSpy = jest\n\t\t\t\t.spyOn( console, 'warn' )\n\t\t\t\t.mockImplementation();\n\t\t\tconst schema = { format: 'email' }; // Schema without type\n\t\t\tconst result = validateValueFromSchema(\n\t\t\t\t'test@example.com',\n\t\t\t\tschema,\n\t\t\t\t'email_field'\n\t\t\t);\n\n\t\t\texpect( result ).toBe( true );\n\t\t\texpect( consoleSpy ).toHaveBeenCalledWith(\n\t\t\t\t'The \"type\" schema keyword for email_field is required.'\n\t\t\t);\n\n\t\t\tconsoleSpy.mockRestore();\n\t\t} );\n\n\t\tit( 'should handle null values correctly', () => {\n\t\t\tconst schema = { type: [ 'string', 'null' ] };\n\t\t\texpect( validateValueFromSchema( null, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'hello', schema ) ).toBe( true );\n\t\t} );\n\t} );\n\n\tdescribe( 'AI-relevant format validation', () => {\n\t\tit( 'should validate email format', () => {\n\t\t\tconst schema = { type: 'string', format: 'email' };\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema( 'user@example.com', schema )\n\t\t\t).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'invalid-email', schema ) ).toBe(\n\t\t\t\t'Invalid email address.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate date-time format', () => {\n\t\t\tconst schema = { type: 'string', format: 'date-time' };\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema( '2024-01-15T10:30:00Z', schema )\n\t\t\t).toBe( true );\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema( '2024-01-15T10:30:00.123Z', schema )\n\t\t\t).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'not-a-date', schema ) ).toBe(\n\t\t\t\t'Invalid date.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate UUID format', () => {\n\t\t\tconst schema = { type: 'string', format: 'uuid' };\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema(\n\t\t\t\t\t'123e4567-e89b-12d3-a456-426614174000',\n\t\t\t\t\tschema\n\t\t\t\t)\n\t\t\t).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'not-a-uuid', schema ) ).toBe(\n\t\t\t\t' is not a valid UUID.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate IPv4 format', () => {\n\t\t\tconst schema = { type: 'string', format: 'ipv4' };\n\t\t\texpect( validateValueFromSchema( '192.168.1.1', schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( '256.256.256.256', schema ) ).toBe(\n\t\t\t\t' is not a valid IP address.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate hostname format', () => {\n\t\t\tconst schema = { type: 'string', format: 'hostname' };\n\t\t\texpect( validateValueFromSchema( 'example.com', schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( 'sub.example.com', schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( 'not a hostname!', schema ) ).toBe(\n\t\t\t\t' is not a valid hostname.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'pattern validation', () => {\n\t\tit( 'should validate string patterns', () => {\n\t\t\tconst schema = { type: 'string', pattern: '^[A-Z][a-z]+$' };\n\t\t\texpect( validateValueFromSchema( 'Hello', schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'hello', schema ) ).toBe(\n\t\t\t\t' does not match pattern ^[A-Z][a-z]+$.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'number constraints', () => {\n\t\tit( 'should validate minimum and maximum', () => {\n\t\t\tconst schema = { type: 'number', minimum: 0, maximum: 100 };\n\t\t\texpect( validateValueFromSchema( 50, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 0, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 100, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( -1, schema ) ).toBe(\n\t\t\t\t' must be greater than or equal to 0'\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( 101, schema ) ).toBe(\n\t\t\t\t' must be less than or equal to 100'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate multipleOf', () => {\n\t\t\tconst schema = { type: 'number', multipleOf: 5 };\n\t\t\texpect( validateValueFromSchema( 10, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 15, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 7, schema ) ).toBe(\n\t\t\t\t' must be a multiple of 5.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'enum validation', () => {\n\t\tit( 'should validate enum values', () => {\n\t\t\tconst schema = {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: [ 'read', 'write', 'execute' ],\n\t\t\t};\n\t\t\texpect( validateValueFromSchema( 'read', schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'delete', schema ) ).toBe(\n\t\t\t\t' is not one of read, write, execute.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'anyOf validation', () => {\n\t\tit( 'should validate anyOf schemas', () => {\n\t\t\tconst schema = {\n\t\t\t\tanyOf: [ { type: 'string' }, { type: 'number' } ],\n\t\t\t};\n\t\t\texpect( validateValueFromSchema( 'hello', schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 42, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( true, schema ) ).toBe(\n\t\t\t\t' is invalid (failed anyOf validation).'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'strict JSON validation (no type coercion)', () => {\n\t\tit( 'should NOT coerce string \"true\" to boolean', () => {\n\t\t\tconst schema = { type: 'boolean' };\n\t\t\texpect( validateValueFromSchema( true, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( false, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'true', schema ) ).toBe(\n\t\t\t\t' is not of type boolean.'\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( '1', schema ) ).toBe(\n\t\t\t\t' is not of type boolean.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should NOT accept empty string as object', () => {\n\t\t\tconst schema = { type: 'object' };\n\t\t\texpect( validateValueFromSchema( {}, schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( '', schema ) ).toBe(\n\t\t\t\t' is not of type object.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'string length constraints', () => {\n\t\tit( 'should validate minLength constraint', () => {\n\t\t\tconst schema = { type: 'string', minLength: 3 };\n\t\t\texpect( validateValueFromSchema( 'hello', schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'hi', schema ) ).toBe(\n\t\t\t\t' must be at least 3 characters long.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate maxLength constraint', () => {\n\t\t\tconst schema = { type: 'string', maxLength: 5 };\n\t\t\texpect( validateValueFromSchema( 'hello', schema ) ).toBe( true );\n\t\t\texpect( validateValueFromSchema( 'hello world', schema ) ).toBe(\n\t\t\t\t' must be at most 5 characters long.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should handle singular character in length messages', () => {\n\t\t\tconst minSchema = { type: 'string', minLength: 1 };\n\t\t\texpect( validateValueFromSchema( '', minSchema ) ).toBe(\n\t\t\t\t' must be at least 1 character long.'\n\t\t\t);\n\n\t\t\tconst maxSchema = { type: 'string', maxLength: 1 };\n\t\t\texpect( validateValueFromSchema( 'ab', maxSchema ) ).toBe(\n\t\t\t\t' must be at most 1 character long.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'array item constraints', () => {\n\t\tit( 'should validate minItems constraint', () => {\n\t\t\tconst schema = { type: 'array', minItems: 2 };\n\t\t\texpect( validateValueFromSchema( [ 1, 2, 3 ], schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( [ 1 ], schema ) ).toBe(\n\t\t\t\t' must contain at least 2 items.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate maxItems constraint', () => {\n\t\t\tconst schema = { type: 'array', maxItems: 3 };\n\t\t\texpect( validateValueFromSchema( [ 1, 2, 3 ], schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( [ 1, 2, 3, 4 ], schema ) ).toBe(\n\t\t\t\t' must contain at most 3 items.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate uniqueItems constraint', () => {\n\t\t\tconst schema = { type: 'array', uniqueItems: true };\n\t\t\texpect( validateValueFromSchema( [ 1, 2, 3 ], schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( [ 1, 2, 2, 3 ], schema ) ).toBe(\n\t\t\t\t' has duplicate items.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should handle singular item in item messages', () => {\n\t\t\tconst minSchema = { type: 'array', minItems: 1 };\n\t\t\texpect( validateValueFromSchema( [], minSchema ) ).toBe(\n\t\t\t\t' must contain at least 1 item.'\n\t\t\t);\n\n\t\t\tconst maxSchema = { type: 'array', maxItems: 1 };\n\t\t\texpect( validateValueFromSchema( [ 1, 2 ], maxSchema ) ).toBe(\n\t\t\t\t' must contain at most 1 item.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'object property constraints', () => {\n\t\tit( 'should validate minProperties constraint', () => {\n\t\t\tconst schema = { type: 'object', minProperties: 2 };\n\t\t\texpect( validateValueFromSchema( { a: 1, b: 2 }, schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( { a: 1 }, schema ) ).toBe(\n\t\t\t\t' must contain at least 2 properties.'\n\t\t\t);\n\t\t} );\n\n\t\tit( 'should validate maxProperties constraint', () => {\n\t\t\tconst schema = { type: 'object', maxProperties: 2 };\n\t\t\texpect( validateValueFromSchema( { a: 1, b: 2 }, schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema( { a: 1, b: 2, c: 3 }, schema )\n\t\t\t).toBe( ' must contain at most 2 properties.' );\n\t\t} );\n\n\t\tit( 'should handle singular property in property messages', () => {\n\t\t\tconst minSchema = { type: 'object', minProperties: 1 };\n\t\t\texpect( validateValueFromSchema( {}, minSchema ) ).toBe(\n\t\t\t\t' must contain at least 1 property.'\n\t\t\t);\n\n\t\t\tconst maxSchema = { type: 'object', maxProperties: 1 };\n\t\t\texpect( validateValueFromSchema( { a: 1, b: 2 }, maxSchema ) ).toBe(\n\t\t\t\t' must contain at most 1 property.'\n\t\t\t);\n\t\t} );\n\t} );\n\n\tdescribe( 'schema edge cases and errors', () => {\n\t\tit( 'should handle empty schema object as valid but warn about missing type', () => {\n\t\t\tconst consoleSpy = jest\n\t\t\t\t.spyOn( console, 'warn' )\n\t\t\t\t.mockImplementation();\n\n\t\t\t// Empty object schema triggers warning about missing type\n\t\t\texpect( validateValueFromSchema( 'anything', {} ) ).toBe( true );\n\t\t\texpect( consoleSpy ).toHaveBeenCalledWith(\n\t\t\t\t'The \"type\" schema keyword for value is required.'\n\t\t\t);\n\n\t\t\tconsoleSpy.mockRestore();\n\t\t} );\n\n\t\tit( 'should warn for invalid schema types but still pass validation', () => {\n\t\t\tconst consoleSpy = jest\n\t\t\t\t.spyOn( console, 'warn' )\n\t\t\t\t.mockImplementation();\n\n\t\t\t// Testing edge cases where schema is not a valid object\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema(\n\t\t\t\t\t'anything',\n\t\t\t\t\tundefined as unknown as Record< string, any >\n\t\t\t\t)\n\t\t\t).toBe( true );\n\t\t\texpect( consoleSpy ).toHaveBeenCalledWith(\n\t\t\t\t'Schema must be an object. Received undefined.'\n\t\t\t);\n\n\t\t\tconsoleSpy.mockClear();\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema(\n\t\t\t\t\t123,\n\t\t\t\t\tnull as unknown as Record< string, any >\n\t\t\t\t)\n\t\t\t).toBe( true );\n\t\t\texpect( consoleSpy ).toHaveBeenCalledWith(\n\t\t\t\t'Schema must be an object. Received object.' // typeof null === 'object'\n\t\t\t);\n\n\t\t\tconsoleSpy.mockClear();\n\t\t\texpect(\n\t\t\t\tvalidateValueFromSchema(\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse as unknown as Record< string, any >\n\t\t\t\t)\n\t\t\t).toBe( true );\n\t\t\texpect( consoleSpy ).toHaveBeenCalledWith(\n\t\t\t\t'Schema must be an object. Received boolean.'\n\t\t\t);\n\n\t\t\tconsoleSpy.mockRestore();\n\t\t} );\n\n\t\tit( 'should handle schema compilation errors', () => {\n\t\t\t// Pass an invalid schema that will cause compilation error\n\t\t\tconst invalidSchema = { type: 'invalid-type' };\n\t\t\tconst consoleErrorSpy = jest\n\t\t\t\t.spyOn( console, 'error' )\n\t\t\t\t.mockImplementation();\n\n\t\t\tconst result = validateValueFromSchema( 'test', invalidSchema );\n\n\t\t\texpect( result ).toBe( 'Invalid schema provided for validation.' );\n\t\t\texpect( consoleErrorSpy ).toHaveBeenCalledWith(\n\t\t\t\t'Schema compilation error:',\n\t\t\t\texpect.any( Error )\n\t\t\t);\n\n\t\t\tconsoleErrorSpy.mockRestore();\n\t\t} );\n\n\t\tit( 'should handle const validation keyword', () => {\n\t\t\tconst schema = {\n\t\t\t\ttype: 'string',\n\t\t\t\tconst: 'exact-value',\n\t\t\t};\n\n\t\t\texpect( validateValueFromSchema( 'exact-value', schema ) ).toBe(\n\t\t\t\ttrue\n\t\t\t);\n\t\t\texpect( validateValueFromSchema( 'different-value', schema ) ).toBe(\n\t\t\t\t'must be equal to constant'\n\t\t\t);\n\t\t} );\n\t} );\n} );\n"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,+BAA+B;AAExC,SAAU,2BAA2B,MAAM;AAC1C,WAAU,mBAAmB,MAAM;AAClC,OAAI,+BAA+B,MAAM;AACxC,YAAM,SAAS,EAAE,MAAM,SAAS;AAChC,aAAQ,wBAAyB,SAAS,MAAO,CAAE,EAAE,KAAM,IAAK;AAChE,aAAQ,wBAAyB,KAAK,MAAO,CAAE,EAAE;AAAA,QAChD;AAAA,MACD;AAAA,IACD,CAAE;AAEF,OAAI,+BAA+B,MAAM;AACxC,YAAM,SAAS,EAAE,MAAM,SAAS;AAChC,aAAQ,wBAAyB,KAAK,MAAO,CAAE,EAAE,KAAM,IAAK;AAC5D,aAAQ,wBAAyB,OAAO,MAAO,CAAE,EAAE,KAAM,IAAK;AAC9D,aAAQ,wBAAyB,SAAS,MAAO,CAAE,EAAE;AAAA,QACpD;AAAA,MACD;AAAA,IACD,CAAE;AAEF,OAAI,gCAAgC,MAAM;AACzC,YAAM,SAAS,EAAE,MAAM,UAAU;AACjC,aAAQ,wBAAyB,MAAM,MAAO,CAAE,EAAE,KAAM,IAAK;AAC7D,aAAQ,wBAAyB,OAAO,MAAO,CAAE,EAAE,KAAM,IAAK;AAC9D,aAAQ,wBAAyB,QAAQ,MAAO,CAAE,EAAE;AAAA,QACnD;AAAA,MACD;AAAA,IACD,CAAE;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