Skip to content

Commit

Permalink
Remove unnecessary ts-expect-error comments from FormData.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed Aug 17, 2022
1 parent 0e4fbb5 commit 3a7bad2
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/FormData.test.ts
Expand Up @@ -191,7 +191,6 @@ test(".get() returns null for non-existent field", t => {
test(".get() returns number values as string", t => {
const fd = new FormData()

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

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

fd.set("first", "value")

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

// @ts-expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
fd.set("third", [1, 2, 3])

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

fd.set("first", "value")

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

// @ts-expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
fd.set("third", [1, 2, 3])

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

fd.set("first", "value")

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

// @ts-expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
fd.set("third", [1, 2, 3])

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

fd.set("first", "value")

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

// @ts-expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
fd.set("third", [1, 2, 3])

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

fd.set("first", "value")

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

// @ts-expect-error FormData will convert everything to a string, except for string | Blob | File. But TS typings will show error here anyway.
fd.set("third", [1, 2, 3])

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

0 comments on commit 3a7bad2

Please sign in to comment.