Skip to content

Commit 3a7bad2

Browse files
committed
Remove unnecessary ts-expect-error comments from FormData.test.ts
1 parent 0e4fbb5 commit 3a7bad2

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/FormData.test.ts

-21
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ test(".get() returns null for non-existent field", t => {
191191
test(".get() returns number values as string", t => {
192192
const fd = new FormData()
193193

194-
// @ts-expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
195194
fd.set("field", 42)
196195

197196
t.is(fd.get("field"), "42")
@@ -313,11 +312,7 @@ test(".forEach() callback should be called once on each filed", t => {
313312
const fd = new FormData()
314313

315314
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.
318315
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.
321316
fd.set("third", [1, 2, 3])
322317

323318
fd.forEach(cb)
@@ -340,11 +335,7 @@ test(".values() Returns the first value on the first call", t => {
340335
const fd = new FormData()
341336

342337
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.
345338
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.
348339
fd.set("third", [1, 2, 3])
349340

350341
const curr = fd.values().next()
@@ -359,11 +350,7 @@ test(".value() yields every value from FormData", t => {
359350
const fd = new FormData()
360351

361352
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.
364353
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.
367354
fd.set("third", [1, 2, 3])
368355

369356
t.deepEqual([...fd.values()], ["value", "42", "1,2,3"])
@@ -384,11 +371,7 @@ test(".keys() Returns the first value on the first call", t => {
384371
const fd = new FormData()
385372

386373
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.
389374
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.
392375
fd.set("third", [1, 2, 3])
393376

394377
const curr = fd.keys().next()
@@ -403,11 +386,7 @@ test(".keys() yields every key from FormData", t => {
403386
const fd = new FormData()
404387

405388
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.
408389
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.
411390
fd.set("third", [1, 2, 3])
412391

413392
t.deepEqual([...fd.keys()], ["first", "second", "third"])

0 commit comments

Comments
 (0)