Skip to content

Commit f17f5a3

Browse files
committed
Remove unnecessary test for ReadableStream
1 parent 8d12a58 commit f17f5a3

File tree

3 files changed

+1
-36
lines changed

3 files changed

+1
-36
lines changed

lib/Encoder.test.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {Readable} from "stream"
33

44
import test from "ava"
55

6-
import {ReadableStream} from "web-streams-polyfill/ponyfill/es2018"
76
import {FormData, File, fileFromPath} from "formdata-node"
87

98
import readStream from "./__helper__/readStream"
@@ -244,32 +243,6 @@ test("Yields every appended File", async t => {
244243
t.is(secondFileContent, await secondFile.text())
245244
})
246245

247-
test("Can be used with ReadableStream", async t => {
248-
const fd = new FormData()
249-
250-
fd.set("field", "Some field value")
251-
252-
const encoder = new Encoder(fd)
253-
const iterable = encoder.encode()
254-
255-
const readable = new ReadableStream<Uint8Array>({
256-
async pull(controller) {
257-
const {value, done} = await iterable.next()
258-
259-
if (done) {
260-
return controller.close()
261-
}
262-
263-
controller.enqueue(value as Uint8Array)
264-
}
265-
})
266-
267-
const expected = await readStream(encoder)
268-
const actual = await readStream(readable)
269-
270-
t.true(actual.equals(expected))
271-
})
272-
273246
test(
274247
"Throws TypeError when the first argument is not a FormData instance",
275248
t => {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@
5858
"pinst": "2.1.6",
5959
"ts-node": "10.0.0",
6060
"ttypescript": "1.5.12",
61-
"typescript": "4.2.4",
62-
"web-streams-polyfill": "3.0.3"
61+
"typescript": "4.2.4"
6362
},
6463
"dependencies": {
6564
"nanoid": "3.1.23"

pnpm-lock.yaml

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)