@@ -88,8 +88,7 @@ describe('convertAction', () => {
88
88
expect (
89
89
convertAction (
90
90
{ type : 'string' } ,
91
- // @ts -expect-error FIXME: Something is wrong here
92
- v . length < string , 3 > ( 3 ) ,
91
+ v . length < v . LengthInput , 3 > ( 3 ) ,
93
92
undefined
94
93
)
95
94
) . toStrictEqual ( {
@@ -101,12 +100,7 @@ describe('convertAction', () => {
101
100
102
101
test ( 'should convert length action for arrays' , ( ) => {
103
102
expect (
104
- convertAction (
105
- { type : 'array' } ,
106
- // @ts -expect-error FIXME: Something is wrong here
107
- v . length < unknown [ ] , 3 > ( 3 ) ,
108
- undefined
109
- )
103
+ convertAction ( { type : 'array' } , v . length < v . LengthInput , 3 > ( 3 ) , undefined )
110
104
) . toStrictEqual ( {
111
105
type : 'array' ,
112
106
minItems : 3 ,
@@ -116,31 +110,20 @@ describe('convertAction', () => {
116
110
117
111
test ( 'should throw error for length action with invalid type' , ( ) => {
118
112
expect ( ( ) =>
119
- convertAction (
120
- { } ,
121
- // @ts -expect-error FIXME: Something is wrong here
122
- v . length < unknown , 3 > ( 3 ) ,
123
- undefined
124
- )
113
+ convertAction ( { } , v . length < v . LengthInput , 3 > ( 3 ) , undefined )
125
114
) . toThrowError ( 'The "length" action is not supported on type "undefined".' ) ;
126
115
expect ( ( ) =>
127
116
convertAction (
128
117
{ type : 'object' } ,
129
- // @ts -expect-error FIXME: Something is wrong here
130
- v . length < unknown , 3 > ( 3 ) ,
118
+ v . length < v . LengthInput , 3 > ( 3 ) ,
131
119
undefined
132
120
)
133
121
) . toThrowError ( 'The "length" action is not supported on type "object".' ) ;
134
122
} ) ;
135
123
136
124
test ( 'should force conversion for length action with invalid type' , ( ) => {
137
125
expect (
138
- convertAction (
139
- { } ,
140
- // @ts -expect-error FIXME: Something is wrong here
141
- v . length < unknown , 3 > ( 3 ) ,
142
- { force : true }
143
- )
126
+ convertAction ( { } , v . length < v . LengthInput , 3 > ( 3 ) , { force : true } )
144
127
) . toStrictEqual ( {
145
128
minLength : 3 ,
146
129
maxLength : 3 ,
@@ -149,12 +132,9 @@ describe('convertAction', () => {
149
132
'The "length" action is not supported on type "undefined".'
150
133
) ;
151
134
expect (
152
- convertAction (
153
- { type : 'object' } ,
154
- // @ts -expect-error FIXME: Something is wrong here
155
- v . length < unknown , 3 > ( 3 ) ,
156
- { force : true }
157
- )
135
+ convertAction ( { type : 'object' } , v . length < v . LengthInput , 3 > ( 3 ) , {
136
+ force : true ,
137
+ } )
158
138
) . toStrictEqual ( { type : 'object' , minLength : 3 , maxLength : 3 } ) ;
159
139
expect ( console . warn ) . toHaveBeenLastCalledWith (
160
140
'The "length" action is not supported on type "object".'
@@ -165,8 +145,7 @@ describe('convertAction', () => {
165
145
expect (
166
146
convertAction (
167
147
{ type : 'string' } ,
168
- // @ts -expect-error FIXME: Something is wrong here
169
- v . minLength < string , 3 > ( 3 ) ,
148
+ v . minLength < v . LengthInput , 3 > ( 3 ) ,
170
149
undefined
171
150
)
172
151
) . toStrictEqual ( {
@@ -179,8 +158,7 @@ describe('convertAction', () => {
179
158
expect (
180
159
convertAction (
181
160
{ type : 'array' } ,
182
- // @ts -expect-error FIXME: Something is wrong here
183
- v . minLength < unknown [ ] , 3 > ( 3 ) ,
161
+ v . minLength < v . LengthInput , 3 > ( 3 ) ,
184
162
undefined
185
163
)
186
164
) . toStrictEqual ( {
@@ -191,20 +169,14 @@ describe('convertAction', () => {
191
169
192
170
test ( 'should throw error for min length action with invalid type' , ( ) => {
193
171
expect ( ( ) =>
194
- convertAction (
195
- { } ,
196
- // @ts -expect-error FIXME: Something is wrong here
197
- v . minLength < unknown , 3 > ( 3 ) ,
198
- undefined
199
- )
172
+ convertAction ( { } , v . minLength < v . LengthInput , 3 > ( 3 ) , undefined )
200
173
) . toThrowError (
201
174
'The "min_length" action is not supported on type "undefined".'
202
175
) ;
203
176
expect ( ( ) =>
204
177
convertAction (
205
178
{ type : 'object' } ,
206
- // @ts -expect-error FIXME: Something is wrong here
207
- v . minLength < unknown , 3 > ( 3 ) ,
179
+ v . minLength < v . LengthInput , 3 > ( 3 ) ,
208
180
undefined
209
181
)
210
182
) . toThrowError (
@@ -214,25 +186,17 @@ describe('convertAction', () => {
214
186
215
187
test ( 'should force conversion for min length action with invalid type' , ( ) => {
216
188
expect (
217
- convertAction (
218
- { } ,
219
- // @ts -expect-error FIXME: Something is wrong here
220
- v . minLength < unknown , 3 > ( 3 ) ,
221
- { force : true }
222
- )
189
+ convertAction ( { } , v . minLength < v . LengthInput , 3 > ( 3 ) , { force : true } )
223
190
) . toStrictEqual ( {
224
191
minLength : 3 ,
225
192
} ) ;
226
193
expect ( console . warn ) . toHaveBeenLastCalledWith (
227
194
'The "min_length" action is not supported on type "undefined".'
228
195
) ;
229
196
expect (
230
- convertAction (
231
- { type : 'object' } ,
232
- // @ts -expect-error FIXME: Something is wrong here
233
- v . minLength < unknown , 3 > ( 3 ) ,
234
- { force : true }
235
- )
197
+ convertAction ( { type : 'object' } , v . minLength < v . LengthInput , 3 > ( 3 ) , {
198
+ force : true ,
199
+ } )
236
200
) . toStrictEqual ( { type : 'object' , minLength : 3 } ) ;
237
201
expect ( console . warn ) . toHaveBeenLastCalledWith (
238
202
'The "min_length" action is not supported on type "object".'
@@ -243,8 +207,7 @@ describe('convertAction', () => {
243
207
expect (
244
208
convertAction (
245
209
{ type : 'string' } ,
246
- // @ts -expect-error FIXME: Something is wrong here
247
- v . maxLength < string , 3 > ( 3 ) ,
210
+ v . maxLength < v . LengthInput , 3 > ( 3 ) ,
248
211
undefined
249
212
)
250
213
) . toStrictEqual ( {
@@ -257,8 +220,7 @@ describe('convertAction', () => {
257
220
expect (
258
221
convertAction (
259
222
{ type : 'array' } ,
260
- // @ts -expect-error FIXME: Something is wrong here
261
- v . maxLength < unknown [ ] , 3 > ( 3 ) ,
223
+ v . maxLength < v . LengthInput , 3 > ( 3 ) ,
262
224
undefined
263
225
)
264
226
) . toStrictEqual ( {
@@ -269,20 +231,14 @@ describe('convertAction', () => {
269
231
270
232
test ( 'should throw error for max length action with invalid type' , ( ) => {
271
233
expect ( ( ) =>
272
- convertAction (
273
- { } ,
274
- // @ts -expect-error FIXME: Something is wrong here
275
- v . maxLength < unknown , 3 > ( 3 ) ,
276
- undefined
277
- )
234
+ convertAction ( { } , v . maxLength < v . LengthInput , 3 > ( 3 ) , undefined )
278
235
) . toThrowError (
279
236
'The "max_length" action is not supported on type "undefined".'
280
237
) ;
281
238
expect ( ( ) =>
282
239
convertAction (
283
240
{ type : 'object' } ,
284
- // @ts -expect-error FIXME: Something is wrong here
285
- v . maxLength < unknown , 3 > ( 3 ) ,
241
+ v . maxLength < v . LengthInput , 3 > ( 3 ) ,
286
242
undefined
287
243
)
288
244
) . toThrowError (
@@ -292,25 +248,17 @@ describe('convertAction', () => {
292
248
293
249
test ( 'should force conversion for max length action with invalid type' , ( ) => {
294
250
expect (
295
- convertAction (
296
- { } ,
297
- // @ts -expect-error FIXME: Something is wrong here
298
- v . maxLength < unknown , 3 > ( 3 ) ,
299
- { force : true }
300
- )
251
+ convertAction ( { } , v . maxLength < v . LengthInput , 3 > ( 3 ) , { force : true } )
301
252
) . toStrictEqual ( {
302
253
maxLength : 3 ,
303
254
} ) ;
304
255
expect ( console . warn ) . toHaveBeenLastCalledWith (
305
256
'The "max_length" action is not supported on type "undefined".'
306
257
) ;
307
258
expect (
308
- convertAction (
309
- { type : 'object' } ,
310
- // @ts -expect-error FIXME: Something is wrong here
311
- v . maxLength < unknown , 3 > ( 3 ) ,
312
- { force : true }
313
- )
259
+ convertAction ( { type : 'object' } , v . maxLength < v . LengthInput , 3 > ( 3 ) , {
260
+ force : true ,
261
+ } )
314
262
) . toStrictEqual ( { type : 'object' , maxLength : 3 } ) ;
315
263
expect ( console . warn ) . toHaveBeenLastCalledWith (
316
264
'The "max_length" action is not supported on type "object".'
@@ -321,8 +269,7 @@ describe('convertAction', () => {
321
269
expect (
322
270
convertAction (
323
271
{ type : 'number' } ,
324
- // @ts -expect-error FIXME: Something is wrong here
325
- v . maxValue < number , 3 > ( 3 ) ,
272
+ v . maxValue < v . ValueInput , 3 > ( 3 ) ,
326
273
undefined
327
274
)
328
275
) . toStrictEqual ( {
@@ -333,46 +280,32 @@ describe('convertAction', () => {
333
280
334
281
test ( 'should throw error for max value action with invalid type' , ( ) => {
335
282
expect ( ( ) =>
336
- convertAction (
337
- { } ,
338
- // @ts -expect-error FIXME: Something is wrong here
339
- v . maxValue < unknown , 3 > ( 3 ) ,
340
- undefined
341
- )
283
+ convertAction ( { } , v . maxValue < v . ValueInput , 3 > ( 3 ) , undefined )
342
284
) . toThrowError (
343
285
'The "max_value" action is not supported on type "undefined".'
344
286
) ;
345
287
expect ( ( ) =>
346
288
convertAction (
347
289
{ type : 'string' } ,
348
- // @ts -expect-error FIXME: Something is wrong here
349
- v . maxValue < string , 3 > ( 3 ) ,
290
+ v . maxValue < v . ValueInput , 3 > ( 3 ) ,
350
291
undefined
351
292
)
352
293
) . toThrowError ( 'The "max_value" action is not supported on type "string".' ) ;
353
294
} ) ;
354
295
355
296
test ( 'should force conversion for max value action with invalid type' , ( ) => {
356
297
expect (
357
- convertAction (
358
- { } ,
359
- // @ts -expect-error FIXME: Something is wrong here
360
- v . maxValue < unknown , 3 > ( 3 ) ,
361
- { force : true }
362
- )
298
+ convertAction ( { } , v . maxValue < v . ValueInput , 3 > ( 3 ) , { force : true } )
363
299
) . toStrictEqual ( {
364
300
maximum : 3 ,
365
301
} ) ;
366
302
expect ( console . warn ) . toHaveBeenLastCalledWith (
367
303
'The "max_value" action is not supported on type "undefined".'
368
304
) ;
369
305
expect (
370
- convertAction (
371
- { type : 'string' } ,
372
- // @ts -expect-error FIXME: Something is wrong here
373
- v . maxValue < string , 3 > ( 3 ) ,
374
- { force : true }
375
- )
306
+ convertAction ( { type : 'string' } , v . maxValue < v . ValueInput , 3 > ( 3 ) , {
307
+ force : true ,
308
+ } )
376
309
) . toStrictEqual ( { type : 'string' , maximum : 3 } ) ;
377
310
expect ( console . warn ) . toHaveBeenLastCalledWith (
378
311
'The "max_value" action is not supported on type "string".'
@@ -383,8 +316,7 @@ describe('convertAction', () => {
383
316
expect (
384
317
convertAction (
385
318
{ type : 'number' } ,
386
- // @ts -expect-error FIXME: Something is wrong here
387
- v . minValue < number , 3 > ( 3 ) ,
319
+ v . minValue < v . ValueInput , 3 > ( 3 ) ,
388
320
undefined
389
321
)
390
322
) . toStrictEqual ( {
@@ -395,46 +327,32 @@ describe('convertAction', () => {
395
327
396
328
test ( 'should throw error for min value action with invalid type' , ( ) => {
397
329
expect ( ( ) =>
398
- convertAction (
399
- { } ,
400
- // @ts -expect-error FIXME: Something is wrong here
401
- v . minValue < unknown , 3 > ( 3 ) ,
402
- undefined
403
- )
330
+ convertAction ( { } , v . minValue < v . ValueInput , 3 > ( 3 ) , undefined )
404
331
) . toThrowError (
405
332
'The "min_value" action is not supported on type "undefined".'
406
333
) ;
407
334
expect ( ( ) =>
408
335
convertAction (
409
336
{ type : 'string' } ,
410
- // @ts -expect-error FIXME: Something is wrong here
411
- v . minValue < string , 3 > ( 3 ) ,
337
+ v . minValue < v . ValueInput , 3 > ( 3 ) ,
412
338
undefined
413
339
)
414
340
) . toThrowError ( 'The "min_value" action is not supported on type "string".' ) ;
415
341
} ) ;
416
342
417
343
test ( 'should force conversion for min value action with invalid type' , ( ) => {
418
344
expect (
419
- convertAction (
420
- { } ,
421
- // @ts -expect-error FIXME: Something is wrong here
422
- v . minValue < unknown , 3 > ( 3 ) ,
423
- { force : true }
424
- )
345
+ convertAction ( { } , v . minValue < v . ValueInput , 3 > ( 3 ) , { force : true } )
425
346
) . toStrictEqual ( {
426
347
minimum : 3 ,
427
348
} ) ;
428
349
expect ( console . warn ) . toHaveBeenLastCalledWith (
429
350
'The "min_value" action is not supported on type "undefined".'
430
351
) ;
431
352
expect (
432
- convertAction (
433
- { type : 'string' } ,
434
- // @ts -expect-error FIXME: Something is wrong here
435
- v . minValue < string , 3 > ( 3 ) ,
436
- { force : true }
437
- )
353
+ convertAction ( { type : 'string' } , v . minValue < v . ValueInput , 3 > ( 3 ) , {
354
+ force : true ,
355
+ } )
438
356
) . toStrictEqual ( { type : 'string' , minimum : 3 } ) ;
439
357
expect ( console . warn ) . toHaveBeenLastCalledWith (
440
358
'The "min_value" action is not supported on type "string".'
@@ -506,8 +424,7 @@ describe('convertAction', () => {
506
424
expect (
507
425
convertAction (
508
426
{ type : 'boolean' } ,
509
- // @ts -expect-error FIXME: Something is wrong here
510
- v . value < boolean , true > ( true ) ,
427
+ v . value < v . ValueInput , true > ( true ) ,
511
428
undefined
512
429
)
513
430
) . toStrictEqual ( {
@@ -517,8 +434,7 @@ describe('convertAction', () => {
517
434
expect (
518
435
convertAction (
519
436
{ type : 'number' } ,
520
- // @ts -expect-error FIXME: Something is wrong here
521
- v . value < boolean , 123 > ( 123 ) ,
437
+ v . value < v . ValueInput , 123 > ( 123 ) ,
522
438
undefined
523
439
)
524
440
) . toStrictEqual ( {
@@ -528,8 +444,7 @@ describe('convertAction', () => {
528
444
expect (
529
445
convertAction (
530
446
{ type : 'string' } ,
531
- // @ts -expect-error FIXME: Something is wrong here
532
- v . value < string , 'foo' > ( 'foo' ) ,
447
+ v . value < v . ValueInput , 'foo' > ( 'foo' ) ,
533
448
undefined
534
449
)
535
450
) . toStrictEqual ( {
0 commit comments