@@ -191,7 +191,6 @@ test(".get() returns null for non-existent field", t => {
191
191
test ( ".get() returns number values as string" , t => {
192
192
const fd = new FormData ( )
193
193
194
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
195
194
fd . set ( "field" , 42 )
196
195
197
196
t . is ( fd . get ( "field" ) , "42" )
@@ -313,11 +312,7 @@ test(".forEach() callback should be called once on each filed", t => {
313
312
const fd = new FormData ( )
314
313
315
314
fd . set ( "first" , "value" )
316
-
317
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
318
315
fd . set ( "second" , 42 )
319
-
320
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
321
316
fd . set ( "third" , [ 1 , 2 , 3 ] )
322
317
323
318
fd . forEach ( cb )
@@ -340,11 +335,7 @@ test(".values() Returns the first value on the first call", t => {
340
335
const fd = new FormData ( )
341
336
342
337
fd . set ( "first" , "value" )
343
-
344
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
345
338
fd . set ( "second" , 42 )
346
-
347
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
348
339
fd . set ( "third" , [ 1 , 2 , 3 ] )
349
340
350
341
const curr = fd . values ( ) . next ( )
@@ -359,11 +350,7 @@ test(".value() yields every value from FormData", t => {
359
350
const fd = new FormData ( )
360
351
361
352
fd . set ( "first" , "value" )
362
-
363
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
364
353
fd . set ( "second" , 42 )
365
-
366
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
367
354
fd . set ( "third" , [ 1 , 2 , 3 ] )
368
355
369
356
t . deepEqual ( [ ...fd . values ( ) ] , [ "value" , "42" , "1,2,3" ] )
@@ -384,11 +371,7 @@ test(".keys() Returns the first value on the first call", t => {
384
371
const fd = new FormData ( )
385
372
386
373
fd . set ( "first" , "value" )
387
-
388
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
389
374
fd . set ( "second" , 42 )
390
-
391
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
392
375
fd . set ( "third" , [ 1 , 2 , 3 ] )
393
376
394
377
const curr = fd . keys ( ) . next ( )
@@ -403,11 +386,7 @@ test(".keys() yields every key from FormData", t => {
403
386
const fd = new FormData ( )
404
387
405
388
fd . set ( "first" , "value" )
406
-
407
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
408
389
fd . set ( "second" , 42 )
409
-
410
- // @ts -expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
411
390
fd . set ( "third" , [ 1 , 2 , 3 ] )
412
391
413
392
t . deepEqual ( [ ...fd . keys ( ) ] , [ "first" , "second" , "third" ] )
0 commit comments