Skip to content

Commit 229e16f

Browse files
committed
Remove tests for FormDataEncoder.getContentLength() method because it's deprecated
1 parent 5e4daeb commit 229e16f

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/FormDataEncoder.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -223,26 +223,6 @@ test("The footer ends with double crlf", async t => {
223223
t.true(actual.endsWith("\r\n\r\n"))
224224
})
225225

226-
test("Returns correct length of the empty FormData content", async t => {
227-
const encoder = new FormDataEncoder(new FormData())
228-
const expected = await readStream(encoder).then(({length}) => length)
229-
230-
t.is(encoder.getContentLength(), expected)
231-
})
232-
233-
test("Returns the length of the FormData content", async t => {
234-
const form = new FormData()
235-
236-
form.set("field", "Some string")
237-
form.set("file", new File(["Some content"], "file.txt"))
238-
239-
const encoder = new FormDataEncoder(form)
240-
241-
const expected = await readStream(encoder).then(({length}) => length)
242-
243-
t.is(encoder.getContentLength(), expected)
244-
})
245-
246226
test(".values() yields headers as Uint8Array", t => {
247227
const form = new FormData()
248228

0 commit comments

Comments
 (0)