@litert/typeguard 1.3.0-dev.0 → 1.4.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.
Files changed (61) hide show
  1. package/CHANGES.md +7 -1
  2. package/lib/BuiltInTypeCompiler.d.ts +1 -1
  3. package/lib/BuiltInTypeCompiler.js +4 -4
  4. package/lib/BuiltInTypeCompiler.js.map +1 -1
  5. package/lib/BuiltInTypes.d.ts +1 -1
  6. package/lib/BuiltInTypes.js +1 -1
  7. package/lib/Common.d.ts +6 -5
  8. package/lib/Common.d.ts.map +1 -1
  9. package/lib/Common.js +1 -1
  10. package/lib/Compiler.d.ts +1 -1
  11. package/lib/Compiler.d.ts.map +1 -1
  12. package/lib/Compiler.js +57 -35
  13. package/lib/Compiler.js.map +1 -1
  14. package/lib/Context.d.ts +2 -2
  15. package/lib/Context.d.ts.map +1 -1
  16. package/lib/Context.js +2 -2
  17. package/lib/Context.js.map +1 -1
  18. package/lib/FilterCompiler.d.ts +3 -3
  19. package/lib/FilterCompiler.d.ts.map +1 -1
  20. package/lib/FilterCompiler.js +4 -4
  21. package/lib/FilterCompiler.js.map +1 -1
  22. package/lib/InlineCompiler.d.ts +2 -2
  23. package/lib/InlineCompiler.d.ts.map +1 -1
  24. package/lib/InlineCompiler.js +5 -7
  25. package/lib/InlineCompiler.js.map +1 -1
  26. package/lib/Internal.d.ts +9 -4
  27. package/lib/Internal.d.ts.map +1 -1
  28. package/lib/Internal.js +45 -4
  29. package/lib/Internal.js.map +1 -1
  30. package/lib/Modifiers.d.ts +2 -1
  31. package/lib/Modifiers.d.ts.map +1 -1
  32. package/lib/Modifiers.js +3 -2
  33. package/lib/Modifiers.js.map +1 -1
  34. package/lib/index.d.ts +1 -1
  35. package/lib/index.js +1 -1
  36. package/lib/langs/JavaScript.d.ts +1 -1
  37. package/lib/langs/JavaScript.js +2 -2
  38. package/package.json +11 -13
  39. package/src/examples/quick-start.ts +5 -1
  40. package/src/lib/BuiltInTypeCompiler.ts +4 -4
  41. package/src/lib/BuiltInTypes.ts +1 -1
  42. package/src/lib/Common.ts +5 -4
  43. package/src/lib/Compiler.ts +66 -39
  44. package/src/lib/Context.ts +2 -2
  45. package/src/lib/FilterCompiler.ts +3 -3
  46. package/src/lib/InlineCompiler.ts +6 -9
  47. package/src/lib/Internal.ts +73 -4
  48. package/src/lib/Modifiers.ts +3 -1
  49. package/src/lib/index.ts +1 -1
  50. package/src/lib/langs/JavaScript.ts +2 -2
  51. package/src/test/00-all.ts +1 -1
  52. package/src/test/01-elemental-types.ts +580 -580
  53. package/src/test/02-array-and-list.ts +43 -43
  54. package/src/test/03-tuple.ts +61 -61
  55. package/src/test/04-from-string.ts +501 -501
  56. package/src/test/05-string-asserts.ts +203 -203
  57. package/src/test/06-structure.ts +71 -71
  58. package/src/test/07-modifiers.ts +297 -48
  59. package/src/test/08-map-and-dict.ts +11 -11
  60. package/src/test/09-exceptions.ts +11 -11
  61. package/src/test/abstracts.ts +57 -29
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Angus Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { createTestDefinition, defaultItemss, ITestSuite } from './abstracts';
17
+ import { createTestDefinition, defaultItems, ITestSuite } from './abstracts';
18
18
 
19
19
  const testItems: ITestSuite = {
20
20
 
@@ -25,16 +25,16 @@ const testItems: ITestSuite = {
25
25
  'rule': '==aasdsadsada',
26
26
  'items': [
27
27
  {
28
- 'inputName': 'string \'aasdsadsada\'',
29
- 'inputValue': 'aasdsadsada',
28
+ 'title': 'string \'aasdsadsada\'',
29
+ 'value': 'aasdsadsada',
30
30
  'expect': true
31
31
  },
32
32
  {
33
- 'inputName': 'string \'AASDSADSADA\'',
34
- 'inputValue': 'AASDSADSADA',
33
+ 'title': 'string \'AASDSADSADA\'',
34
+ 'value': 'AASDSADSADA',
35
35
  'expect': false
36
36
  },
37
- ...defaultItemss({})
37
+ ...defaultItems({})
38
38
  ]
39
39
  },
40
40
  {
@@ -42,16 +42,16 @@ const testItems: ITestSuite = {
42
42
  'rule': '=aasdsadsada',
43
43
  'items': [
44
44
  {
45
- 'inputName': 'string \'aasdsadsada\'',
46
- 'inputValue': 'aasdsadsada',
45
+ 'title': 'string \'aasdsadsada\'',
46
+ 'value': 'aasdsadsada',
47
47
  'expect': true
48
48
  },
49
49
  {
50
- 'inputName': 'string \'AASDSADSADA\'',
51
- 'inputValue': 'AASDSADSADA',
50
+ 'title': 'string \'AASDSADSADA\'',
51
+ 'value': 'AASDSADSADA',
52
52
  'expect': false
53
53
  },
54
- ...defaultItemss({})
54
+ ...defaultItems({})
55
55
  ]
56
56
  },
57
57
  {
@@ -59,16 +59,16 @@ const testItems: ITestSuite = {
59
59
  'rule': ':equal:aasdsadsada',
60
60
  'items': [
61
61
  {
62
- 'inputName': 'string \'aasdsadsada\'',
63
- 'inputValue': 'aasdsadsada',
62
+ 'title': 'string \'aasdsadsada\'',
63
+ 'value': 'aasdsadsada',
64
64
  'expect': true
65
65
  },
66
66
  {
67
- 'inputName': 'string \'AASDSADSADA\'',
68
- 'inputValue': 'AASDSADSADA',
67
+ 'title': 'string \'AASDSADSADA\'',
68
+ 'value': 'AASDSADSADA',
69
69
  'expect': false
70
70
  },
71
- ...defaultItemss({})
71
+ ...defaultItems({})
72
72
  ]
73
73
  },
74
74
  {
@@ -76,16 +76,16 @@ const testItems: ITestSuite = {
76
76
  'rule': ':equal-i:aasdsadsada',
77
77
  'items': [
78
78
  {
79
- 'inputName': 'string \'aasdsadsada\'',
80
- 'inputValue': 'aasdsadsada',
79
+ 'title': 'string \'aasdsadsada\'',
80
+ 'value': 'aasdsadsada',
81
81
  'expect': true
82
82
  },
83
83
  {
84
- 'inputName': 'string \'AASDSADSADA\'',
85
- 'inputValue': 'AASDSADSADA',
84
+ 'title': 'string \'AASDSADSADA\'',
85
+ 'value': 'AASDSADSADA',
86
86
  'expect': true
87
87
  },
88
- ...defaultItemss({})
88
+ ...defaultItems({})
89
89
  ]
90
90
  },
91
91
  {
@@ -93,16 +93,16 @@ const testItems: ITestSuite = {
93
93
  'rule': '%=aasdsadsada',
94
94
  'items': [
95
95
  {
96
- 'inputName': 'string \'aasdsadsada\'',
97
- 'inputValue': 'aasdsadsada',
96
+ 'title': 'string \'aasdsadsada\'',
97
+ 'value': 'aasdsadsada',
98
98
  'expect': true
99
99
  },
100
100
  {
101
- 'inputName': 'string \'AASDSADSADA\'',
102
- 'inputValue': 'AASDSADSADA',
101
+ 'title': 'string \'AASDSADSADA\'',
102
+ 'value': 'AASDSADSADA',
103
103
  'expect': true
104
104
  },
105
- ...defaultItemss({})
105
+ ...defaultItems({})
106
106
  ]
107
107
  },
108
108
  {
@@ -110,16 +110,16 @@ const testItems: ITestSuite = {
110
110
  'rule': '!=aasdsadsada',
111
111
  'items': [
112
112
  {
113
- 'inputName': 'string \'aasdsadsada\'',
114
- 'inputValue': 'aasdsadsada',
113
+ 'title': 'string \'aasdsadsada\'',
114
+ 'value': 'aasdsadsada',
115
115
  'expect': false
116
116
  },
117
117
  {
118
- 'inputName': 'string \'AASDSADSADA\'',
119
- 'inputValue': 'AASDSADSADA',
118
+ 'title': 'string \'AASDSADSADA\'',
119
+ 'value': 'AASDSADSADA',
120
120
  'expect': true
121
121
  },
122
- ...defaultItemss({
122
+ ...defaultItems({
123
123
  'string \'hello\'': true,
124
124
  'empty string': true
125
125
  })
@@ -130,16 +130,16 @@ const testItems: ITestSuite = {
130
130
  'rule': ':not-equal:aasdsadsada',
131
131
  'items': [
132
132
  {
133
- 'inputName': 'string \'aasdsadsada\'',
134
- 'inputValue': 'aasdsadsada',
133
+ 'title': 'string \'aasdsadsada\'',
134
+ 'value': 'aasdsadsada',
135
135
  'expect': false
136
136
  },
137
137
  {
138
- 'inputName': 'string \'AASDSADSADA\'',
139
- 'inputValue': 'AASDSADSADA',
138
+ 'title': 'string \'AASDSADSADA\'',
139
+ 'value': 'AASDSADSADA',
140
140
  'expect': true
141
141
  },
142
- ...defaultItemss({
142
+ ...defaultItems({
143
143
  'string \'hello\'': true,
144
144
  'empty string': true
145
145
  })
@@ -150,16 +150,16 @@ const testItems: ITestSuite = {
150
150
  'rule': ':not-equal-i:aasdsadsada',
151
151
  'items': [
152
152
  {
153
- 'inputName': 'string \'aasdsadsada\'',
154
- 'inputValue': 'aasdsadsada',
153
+ 'title': 'string \'aasdsadsada\'',
154
+ 'value': 'aasdsadsada',
155
155
  'expect': false
156
156
  },
157
157
  {
158
- 'inputName': 'string \'AASDSADSADA\'',
159
- 'inputValue': 'AASDSADSADA',
158
+ 'title': 'string \'AASDSADSADA\'',
159
+ 'value': 'AASDSADSADA',
160
160
  'expect': false
161
161
  },
162
- ...defaultItemss({
162
+ ...defaultItems({
163
163
  'string \'hello\'': true,
164
164
  'empty string': true
165
165
  })
@@ -170,16 +170,16 @@ const testItems: ITestSuite = {
170
170
  'rule': '%!aasdsadsada',
171
171
  'items': [
172
172
  {
173
- 'inputName': 'string \'aasdsadsada\'',
174
- 'inputValue': 'aasdsadsada',
173
+ 'title': 'string \'aasdsadsada\'',
174
+ 'value': 'aasdsadsada',
175
175
  'expect': false
176
176
  },
177
177
  {
178
- 'inputName': 'string \'AASDSADSADA\'',
179
- 'inputValue': 'AASDSADSADA',
178
+ 'title': 'string \'AASDSADSADA\'',
179
+ 'value': 'AASDSADSADA',
180
180
  'expect': false
181
181
  },
182
- ...defaultItemss({
182
+ ...defaultItems({
183
183
  'string \'hello\'': true,
184
184
  'empty string': true
185
185
  })
@@ -190,16 +190,16 @@ const testItems: ITestSuite = {
190
190
  'rule': '^=hello',
191
191
  'items': [
192
192
  {
193
- 'inputName': 'string \'hello world\'',
194
- 'inputValue': 'hello world',
193
+ 'title': 'string \'hello world\'',
194
+ 'value': 'hello world',
195
195
  'expect': true
196
196
  },
197
197
  {
198
- 'inputName': 'string \'hello world\'',
199
- 'inputValue': 'Hello world',
198
+ 'title': 'string \'hello world\'',
199
+ 'value': 'Hello world',
200
200
  'expect': false
201
201
  },
202
- ...defaultItemss({
202
+ ...defaultItems({
203
203
  'string \'hello\'': true,
204
204
  'empty string': false
205
205
  })
@@ -210,16 +210,16 @@ const testItems: ITestSuite = {
210
210
  'rule': ':start-with:hello',
211
211
  'items': [
212
212
  {
213
- 'inputName': 'string \'hello world\'',
214
- 'inputValue': 'hello world',
213
+ 'title': 'string \'hello world\'',
214
+ 'value': 'hello world',
215
215
  'expect': true
216
216
  },
217
217
  {
218
- 'inputName': 'string \'hello world\'',
219
- 'inputValue': 'Hello world',
218
+ 'title': 'string \'hello world\'',
219
+ 'value': 'Hello world',
220
220
  'expect': false
221
221
  },
222
- ...defaultItemss({
222
+ ...defaultItems({
223
223
  'string \'hello\'': true,
224
224
  'empty string': false
225
225
  })
@@ -230,16 +230,16 @@ const testItems: ITestSuite = {
230
230
  'rule': ':start-with-i:hello',
231
231
  'items': [
232
232
  {
233
- 'inputName': 'string \'hello world\'',
234
- 'inputValue': 'hello world',
233
+ 'title': 'string \'hello world\'',
234
+ 'value': 'hello world',
235
235
  'expect': true
236
236
  },
237
237
  {
238
- 'inputName': 'string \'hello world\'',
239
- 'inputValue': 'Hello world',
238
+ 'title': 'string \'hello world\'',
239
+ 'value': 'Hello world',
240
240
  'expect': true
241
241
  },
242
- ...defaultItemss({
242
+ ...defaultItems({
243
243
  'string \'hello\'': true,
244
244
  'empty string': false
245
245
  })
@@ -250,16 +250,16 @@ const testItems: ITestSuite = {
250
250
  'rule': '^!hello',
251
251
  'items': [
252
252
  {
253
- 'inputName': 'string \'hello world\'',
254
- 'inputValue': 'hello world',
253
+ 'title': 'string \'hello world\'',
254
+ 'value': 'hello world',
255
255
  'expect': false
256
256
  },
257
257
  {
258
- 'inputName': 'string \'hello world\'',
259
- 'inputValue': 'Hello world',
258
+ 'title': 'string \'hello world\'',
259
+ 'value': 'Hello world',
260
260
  'expect': true
261
261
  },
262
- ...defaultItemss({
262
+ ...defaultItems({
263
263
  'string \'hello\'': false,
264
264
  'empty string': true
265
265
  })
@@ -270,16 +270,16 @@ const testItems: ITestSuite = {
270
270
  'rule': ':not-start-with:hello',
271
271
  'items': [
272
272
  {
273
- 'inputName': 'string \'hello world\'',
274
- 'inputValue': 'hello world',
273
+ 'title': 'string \'hello world\'',
274
+ 'value': 'hello world',
275
275
  'expect': false
276
276
  },
277
277
  {
278
- 'inputName': 'string \'hello world\'',
279
- 'inputValue': 'Hello world',
278
+ 'title': 'string \'hello world\'',
279
+ 'value': 'Hello world',
280
280
  'expect': true
281
281
  },
282
- ...defaultItemss({
282
+ ...defaultItems({
283
283
  'string \'hello\'': false,
284
284
  'empty string': true
285
285
  })
@@ -290,16 +290,16 @@ const testItems: ITestSuite = {
290
290
  'rule': ':not-start-with-i:hello',
291
291
  'items': [
292
292
  {
293
- 'inputName': 'string \'hello world\'',
294
- 'inputValue': 'hello world',
293
+ 'title': 'string \'hello world\'',
294
+ 'value': 'hello world',
295
295
  'expect': false
296
296
  },
297
297
  {
298
- 'inputName': 'string \'hello world\'',
299
- 'inputValue': 'Hello world',
298
+ 'title': 'string \'hello world\'',
299
+ 'value': 'Hello world',
300
300
  'expect': false
301
301
  },
302
- ...defaultItemss({
302
+ ...defaultItems({
303
303
  'string \'hello\'': false,
304
304
  'empty string': true
305
305
  })
@@ -310,16 +310,16 @@ const testItems: ITestSuite = {
310
310
  'rule': '$=world',
311
311
  'items': [
312
312
  {
313
- 'inputName': 'string \'hello world\'',
314
- 'inputValue': 'hello world',
313
+ 'title': 'string \'hello world\'',
314
+ 'value': 'hello world',
315
315
  'expect': true
316
316
  },
317
317
  {
318
- 'inputName': 'string \'hello world\'',
319
- 'inputValue': 'Hello World',
318
+ 'title': 'string \'hello world\'',
319
+ 'value': 'Hello World',
320
320
  'expect': false
321
321
  },
322
- ...defaultItemss({
322
+ ...defaultItems({
323
323
  'string \'hello\'': false,
324
324
  'empty string': false
325
325
  })
@@ -330,16 +330,16 @@ const testItems: ITestSuite = {
330
330
  'rule': ':end-with:world',
331
331
  'items': [
332
332
  {
333
- 'inputName': 'string \'hello world\'',
334
- 'inputValue': 'hello world',
333
+ 'title': 'string \'hello world\'',
334
+ 'value': 'hello world',
335
335
  'expect': true
336
336
  },
337
337
  {
338
- 'inputName': 'string \'hello world\'',
339
- 'inputValue': 'Hello World',
338
+ 'title': 'string \'hello world\'',
339
+ 'value': 'Hello World',
340
340
  'expect': false
341
341
  },
342
- ...defaultItemss({
342
+ ...defaultItems({
343
343
  'string \'hello\'': false,
344
344
  'empty string': false
345
345
  })
@@ -350,16 +350,16 @@ const testItems: ITestSuite = {
350
350
  'rule': ':end-with-i:world',
351
351
  'items': [
352
352
  {
353
- 'inputName': 'string \'hello world\'',
354
- 'inputValue': 'hello world',
353
+ 'title': 'string \'hello world\'',
354
+ 'value': 'hello world',
355
355
  'expect': true
356
356
  },
357
357
  {
358
- 'inputName': 'string \'hello world\'',
359
- 'inputValue': 'Hello World',
358
+ 'title': 'string \'hello world\'',
359
+ 'value': 'Hello World',
360
360
  'expect': true
361
361
  },
362
- ...defaultItemss({
362
+ ...defaultItems({
363
363
  'string \'hello\'': false,
364
364
  'empty string': false
365
365
  })
@@ -370,16 +370,16 @@ const testItems: ITestSuite = {
370
370
  'rule': '$!world',
371
371
  'items': [
372
372
  {
373
- 'inputName': 'string \'hello world\'',
374
- 'inputValue': 'hello world',
373
+ 'title': 'string \'hello world\'',
374
+ 'value': 'hello world',
375
375
  'expect': false
376
376
  },
377
377
  {
378
- 'inputName': 'string \'hello world\'',
379
- 'inputValue': 'Hello World',
378
+ 'title': 'string \'hello world\'',
379
+ 'value': 'Hello World',
380
380
  'expect': true
381
381
  },
382
- ...defaultItemss({
382
+ ...defaultItems({
383
383
  'string \'hello\'': true,
384
384
  'empty string': true
385
385
  })
@@ -390,16 +390,16 @@ const testItems: ITestSuite = {
390
390
  'rule': ':not-end-with:world',
391
391
  'items': [
392
392
  {
393
- 'inputName': 'string \'hello world\'',
394
- 'inputValue': 'hello world',
393
+ 'title': 'string \'hello world\'',
394
+ 'value': 'hello world',
395
395
  'expect': false
396
396
  },
397
397
  {
398
- 'inputName': 'string \'hello world\'',
399
- 'inputValue': 'Hello World',
398
+ 'title': 'string \'hello world\'',
399
+ 'value': 'Hello World',
400
400
  'expect': true
401
401
  },
402
- ...defaultItemss({
402
+ ...defaultItems({
403
403
  'string \'hello\'': true,
404
404
  'empty string': true
405
405
  })
@@ -410,16 +410,16 @@ const testItems: ITestSuite = {
410
410
  'rule': ':not-end-with-i:world',
411
411
  'items': [
412
412
  {
413
- 'inputName': 'string \'hello world\'',
414
- 'inputValue': 'hello World',
413
+ 'title': 'string \'hello world\'',
414
+ 'value': 'hello World',
415
415
  'expect': false
416
416
  },
417
417
  {
418
- 'inputName': 'string \'hello world\'',
419
- 'inputValue': 'Hello world',
418
+ 'title': 'string \'hello world\'',
419
+ 'value': 'Hello world',
420
420
  'expect': false
421
421
  },
422
- ...defaultItemss({
422
+ ...defaultItems({
423
423
  'string \'hello\'': true,
424
424
  'empty string': true
425
425
  })
@@ -435,16 +435,16 @@ const testItems: ITestSuite = {
435
435
  'rule': '?=hello',
436
436
  'items': [
437
437
  {
438
- 'inputName': 'string \'hello world\'',
439
- 'inputValue': 'hello world',
438
+ 'title': 'string \'hello world\'',
439
+ 'value': 'hello world',
440
440
  'expect': true
441
441
  },
442
442
  {
443
- 'inputName': 'string \'hello world\'',
444
- 'inputValue': 'Hello world',
443
+ 'title': 'string \'hello world\'',
444
+ 'value': 'Hello world',
445
445
  'expect': false
446
446
  },
447
- ...defaultItemss({
447
+ ...defaultItems({
448
448
  'string \'hello\'': true,
449
449
  'empty string': false
450
450
  })
@@ -455,16 +455,16 @@ const testItems: ITestSuite = {
455
455
  'rule': ':include:hello',
456
456
  'items': [
457
457
  {
458
- 'inputName': 'string \'hello world\'',
459
- 'inputValue': 'hello world',
458
+ 'title': 'string \'hello world\'',
459
+ 'value': 'hello world',
460
460
  'expect': true
461
461
  },
462
462
  {
463
- 'inputName': 'string \'hello world\'',
464
- 'inputValue': 'Hello world',
463
+ 'title': 'string \'hello world\'',
464
+ 'value': 'Hello world',
465
465
  'expect': false
466
466
  },
467
- ...defaultItemss({
467
+ ...defaultItems({
468
468
  'string \'hello\'': true,
469
469
  'empty string': false
470
470
  })
@@ -475,16 +475,16 @@ const testItems: ITestSuite = {
475
475
  'rule': '*=hello',
476
476
  'items': [
477
477
  {
478
- 'inputName': 'string \'hello world\'',
479
- 'inputValue': 'hello world',
478
+ 'title': 'string \'hello world\'',
479
+ 'value': 'hello world',
480
480
  'expect': true
481
481
  },
482
482
  {
483
- 'inputName': 'string \'hello world\'',
484
- 'inputValue': 'Hello world',
483
+ 'title': 'string \'hello world\'',
484
+ 'value': 'Hello world',
485
485
  'expect': true
486
486
  },
487
- ...defaultItemss({
487
+ ...defaultItems({
488
488
  'string \'hello\'': true,
489
489
  'empty string': false
490
490
  })
@@ -495,16 +495,16 @@ const testItems: ITestSuite = {
495
495
  'rule': ':include-i:hello',
496
496
  'items': [
497
497
  {
498
- 'inputName': 'string \'hello world\'',
499
- 'inputValue': 'hello world',
498
+ 'title': 'string \'hello world\'',
499
+ 'value': 'hello world',
500
500
  'expect': true
501
501
  },
502
502
  {
503
- 'inputName': 'string \'hello world\'',
504
- 'inputValue': 'Hello world',
503
+ 'title': 'string \'hello world\'',
504
+ 'value': 'Hello world',
505
505
  'expect': true
506
506
  },
507
- ...defaultItemss({
507
+ ...defaultItems({
508
508
  'string \'hello\'': true,
509
509
  'empty string': false
510
510
  })
@@ -515,16 +515,16 @@ const testItems: ITestSuite = {
515
515
  'rule': '?!hello',
516
516
  'items': [
517
517
  {
518
- 'inputName': 'string \'hello world\'',
519
- 'inputValue': 'hello world',
518
+ 'title': 'string \'hello world\'',
519
+ 'value': 'hello world',
520
520
  'expect': false
521
521
  },
522
522
  {
523
- 'inputName': 'string \'hello world\'',
524
- 'inputValue': 'Hello world',
523
+ 'title': 'string \'hello world\'',
524
+ 'value': 'Hello world',
525
525
  'expect': true
526
526
  },
527
- ...defaultItemss({
527
+ ...defaultItems({
528
528
  'string \'hello\'': false,
529
529
  'empty string': true
530
530
  })
@@ -535,16 +535,16 @@ const testItems: ITestSuite = {
535
535
  'rule': ':not-include:hello',
536
536
  'items': [
537
537
  {
538
- 'inputName': 'string \'hello world\'',
539
- 'inputValue': 'hello world',
538
+ 'title': 'string \'hello world\'',
539
+ 'value': 'hello world',
540
540
  'expect': false
541
541
  },
542
542
  {
543
- 'inputName': 'string \'hello world\'',
544
- 'inputValue': 'Hello world',
543
+ 'title': 'string \'hello world\'',
544
+ 'value': 'Hello world',
545
545
  'expect': true
546
546
  },
547
- ...defaultItemss({
547
+ ...defaultItems({
548
548
  'string \'hello\'': false,
549
549
  'empty string': true
550
550
  })
@@ -555,16 +555,16 @@ const testItems: ITestSuite = {
555
555
  'rule': ':not-include-i:hello',
556
556
  'items': [
557
557
  {
558
- 'inputName': 'string \'hello world\'',
559
- 'inputValue': 'hello world',
558
+ 'title': 'string \'hello world\'',
559
+ 'value': 'hello world',
560
560
  'expect': false
561
561
  },
562
562
  {
563
- 'inputName': 'string \'hello world\'',
564
- 'inputValue': 'Hello world',
563
+ 'title': 'string \'hello world\'',
564
+ 'value': 'Hello world',
565
565
  'expect': false
566
566
  },
567
- ...defaultItemss({
567
+ ...defaultItems({
568
568
  'string \'hello\'': false,
569
569
  'empty string': true
570
570
  })
@@ -575,16 +575,16 @@ const testItems: ITestSuite = {
575
575
  'rule': '*!hello',
576
576
  'items': [
577
577
  {
578
- 'inputName': 'string \'hello world\'',
579
- 'inputValue': 'hello world',
578
+ 'title': 'string \'hello world\'',
579
+ 'value': 'hello world',
580
580
  'expect': false
581
581
  },
582
582
  {
583
- 'inputName': 'string \'hello world\'',
584
- 'inputValue': 'Hello world',
583
+ 'title': 'string \'hello world\'',
584
+ 'value': 'Hello world',
585
585
  'expect': false
586
586
  },
587
- ...defaultItemss({
587
+ ...defaultItems({
588
588
  'string \'hello\'': false,
589
589
  'empty string': true
590
590
  })
@@ -595,21 +595,21 @@ const testItems: ITestSuite = {
595
595
  'rule': '~=/hello/i',
596
596
  'items': [
597
597
  {
598
- 'inputName': 'string \'hello world\'',
599
- 'inputValue': 'hello world',
598
+ 'title': 'string \'hello world\'',
599
+ 'value': 'hello world',
600
600
  'expect': true
601
601
  },
602
602
  {
603
- 'inputName': 'string \'hello world\'',
604
- 'inputValue': 'Hello world',
603
+ 'title': 'string \'hello world\'',
604
+ 'value': 'Hello world',
605
605
  'expect': true
606
606
  },
607
607
  {
608
- 'inputName': 'string \'hi world\'',
609
- 'inputValue': 'hi world',
608
+ 'title': 'string \'hi world\'',
609
+ 'value': 'hi world',
610
610
  'expect': false
611
611
  },
612
- ...defaultItemss({
612
+ ...defaultItems({
613
613
  'string \'hello\'': true,
614
614
  'empty string': false
615
615
  })
@@ -620,21 +620,21 @@ const testItems: ITestSuite = {
620
620
  'rule': '~=hello',
621
621
  'items': [
622
622
  {
623
- 'inputName': 'string \'hello world\'',
624
- 'inputValue': 'hello world',
623
+ 'title': 'string \'hello world\'',
624
+ 'value': 'hello world',
625
625
  'expect': true
626
626
  },
627
627
  {
628
- 'inputName': 'string \'hello world\'',
629
- 'inputValue': 'Hello world',
628
+ 'title': 'string \'hello world\'',
629
+ 'value': 'Hello world',
630
630
  'expect': false
631
631
  },
632
632
  {
633
- 'inputName': 'string \'hi world\'',
634
- 'inputValue': 'hi world',
633
+ 'title': 'string \'hi world\'',
634
+ 'value': 'hi world',
635
635
  'expect': false
636
636
  },
637
- ...defaultItemss({
637
+ ...defaultItems({
638
638
  'string \'hello\'': true,
639
639
  'empty string': false
640
640
  })
@@ -645,21 +645,21 @@ const testItems: ITestSuite = {
645
645
  'rule': '~/hello/i',
646
646
  'items': [
647
647
  {
648
- 'inputName': 'string \'hello world\'',
649
- 'inputValue': 'hello world',
648
+ 'title': 'string \'hello world\'',
649
+ 'value': 'hello world',
650
650
  'expect': true
651
651
  },
652
652
  {
653
- 'inputName': 'string \'hello world\'',
654
- 'inputValue': 'Hello world',
653
+ 'title': 'string \'hello world\'',
654
+ 'value': 'Hello world',
655
655
  'expect': true
656
656
  },
657
657
  {
658
- 'inputName': 'string \'hi world\'',
659
- 'inputValue': 'hi world',
658
+ 'title': 'string \'hi world\'',
659
+ 'value': 'hi world',
660
660
  'expect': false
661
661
  },
662
- ...defaultItemss({
662
+ ...defaultItems({
663
663
  'string \'hello\'': true,
664
664
  'empty string': false
665
665
  })
@@ -670,21 +670,21 @@ const testItems: ITestSuite = {
670
670
  'rule': '~hello',
671
671
  'items': [
672
672
  {
673
- 'inputName': 'string \'hello world\'',
674
- 'inputValue': 'hello world',
673
+ 'title': 'string \'hello world\'',
674
+ 'value': 'hello world',
675
675
  'expect': true
676
676
  },
677
677
  {
678
- 'inputName': 'string \'hello world\'',
679
- 'inputValue': 'Hello world',
678
+ 'title': 'string \'hello world\'',
679
+ 'value': 'Hello world',
680
680
  'expect': false
681
681
  },
682
682
  {
683
- 'inputName': 'string \'hi world\'',
684
- 'inputValue': 'hi world',
683
+ 'title': 'string \'hi world\'',
684
+ 'value': 'hi world',
685
685
  'expect': false
686
686
  },
687
- ...defaultItemss({
687
+ ...defaultItems({
688
688
  'string \'hello\'': true,
689
689
  'empty string': false
690
690
  })
@@ -695,21 +695,21 @@ const testItems: ITestSuite = {
695
695
  'rule': '~!hello',
696
696
  'items': [
697
697
  {
698
- 'inputName': 'string \'hello world\'',
699
- 'inputValue': 'hello world',
698
+ 'title': 'string \'hello world\'',
699
+ 'value': 'hello world',
700
700
  'expect': false
701
701
  },
702
702
  {
703
- 'inputName': 'string \'hello world\'',
704
- 'inputValue': 'Hello world',
703
+ 'title': 'string \'hello world\'',
704
+ 'value': 'Hello world',
705
705
  'expect': true
706
706
  },
707
707
  {
708
- 'inputName': 'string \'hi world\'',
709
- 'inputValue': 'hi world',
708
+ 'title': 'string \'hi world\'',
709
+ 'value': 'hi world',
710
710
  'expect': true
711
711
  },
712
- ...defaultItemss({
712
+ ...defaultItems({
713
713
  'string \'hello\'': false,
714
714
  'empty string': true
715
715
  })
@@ -720,21 +720,21 @@ const testItems: ITestSuite = {
720
720
  'rule': '~!/hello/i',
721
721
  'items': [
722
722
  {
723
- 'inputName': 'string \'hello world\'',
724
- 'inputValue': 'hello world',
723
+ 'title': 'string \'hello world\'',
724
+ 'value': 'hello world',
725
725
  'expect': false
726
726
  },
727
727
  {
728
- 'inputName': 'string \'hello world\'',
729
- 'inputValue': 'Hello world',
728
+ 'title': 'string \'hello world\'',
729
+ 'value': 'Hello world',
730
730
  'expect': false
731
731
  },
732
732
  {
733
- 'inputName': 'string \'hi world\'',
734
- 'inputValue': 'hi world',
733
+ 'title': 'string \'hi world\'',
734
+ 'value': 'hi world',
735
735
  'expect': true
736
736
  },
737
- ...defaultItemss({
737
+ ...defaultItems({
738
738
  'string \'hello\'': false,
739
739
  'empty string': true
740
740
  })
@@ -745,21 +745,21 @@ const testItems: ITestSuite = {
745
745
  'rule': '!~!/hello/i',
746
746
  'items': [
747
747
  {
748
- 'inputName': 'string \'hello world\'',
749
- 'inputValue': 'hello world',
748
+ 'title': 'string \'hello world\'',
749
+ 'value': 'hello world',
750
750
  'expect': true
751
751
  },
752
752
  {
753
- 'inputName': 'string \'hello world\'',
754
- 'inputValue': 'Hello world',
753
+ 'title': 'string \'hello world\'',
754
+ 'value': 'Hello world',
755
755
  'expect': true
756
756
  },
757
757
  {
758
- 'inputName': 'string \'hi world\'',
759
- 'inputValue': 'hi world',
758
+ 'title': 'string \'hi world\'',
759
+ 'value': 'hi world',
760
760
  'expect': false
761
761
  },
762
- ...defaultItemss({
762
+ ...defaultItems({
763
763
  'empty string': false
764
764
  }, true)
765
765
  ]
@@ -769,21 +769,21 @@ const testItems: ITestSuite = {
769
769
  'rule': ['$.not', '~!/hello/i'],
770
770
  'items': [
771
771
  {
772
- 'inputName': 'string \'hello world\'',
773
- 'inputValue': 'hello world',
772
+ 'title': 'string \'hello world\'',
773
+ 'value': 'hello world',
774
774
  'expect': true
775
775
  },
776
776
  {
777
- 'inputName': 'string \'hello world\'',
778
- 'inputValue': 'Hello world',
777
+ 'title': 'string \'hello world\'',
778
+ 'value': 'Hello world',
779
779
  'expect': true
780
780
  },
781
781
  {
782
- 'inputName': 'string \'hi world\'',
783
- 'inputValue': 'hi world',
782
+ 'title': 'string \'hi world\'',
783
+ 'value': 'hi world',
784
784
  'expect': false
785
785
  },
786
- ...defaultItemss({
786
+ ...defaultItems({
787
787
  'empty string': false
788
788
  }, true)
789
789
  ]