diff options
| author | 2023-04-06 16:59:06 -0400 | |
|---|---|---|
| committer | 2023-04-06 13:59:06 -0700 | |
| commit | f788519263b5713cd5655a6e3bcf3e3f9b1aea02 (patch) | |
| tree | 748c890359263f9a7603f0f06d4d307907db939f /test/regression | |
| parent | 8a73c2a453fc3a569073f6f1f584369d657686f5 (diff) | |
| download | bun-f788519263b5713cd5655a6e3bcf3e3f9b1aea02.tar.gz bun-f788519263b5713cd5655a6e3bcf3e3f9b1aea02.tar.zst bun-f788519263b5713cd5655a6e3bcf3e3f9b1aea02.zip | |
bun-types: infer strict `Subprocess` from `Bun.spawn()` options, part 2 (#2573)
Diffstat (limited to 'test/regression')
| -rw-r--r-- | test/regression/issue/02499.test.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/regression/issue/02499.test.ts b/test/regression/issue/02499.test.ts index da114d95d..0e4666b36 100644 --- a/test/regression/issue/02499.test.ts +++ b/test/regression/issue/02499.test.ts @@ -44,17 +44,16 @@ it("onAborted() and onWritable are not called after receiving an empty response env: bunEnv, }); - const reader = bunProcess.stdout?.getReader(); + const reader = bunProcess.stdout.getReader(); let hostname, port; { - const chunks = []; + const chunks: Buffer[] = []; var decoder = new TextDecoder(); while (!hostname && !port) { - // @ts-expect-error TODO - var { value, done } = await reader?.read(); + var { value, done } = await reader.read(); if (done) break; if (chunks.length > 0) { - chunks.push(value); + chunks.push(value!); } try { if (chunks.length > 0) { @@ -63,7 +62,7 @@ it("onAborted() and onWritable are not called after receiving an empty response ({ hostname, port } = JSON.parse(decoder.decode(value).trim())); } catch { - chunks.push(value); + chunks.push(value!); } } } |
