summaryrefslogtreecommitdiff
path: root/cli/js/tests/buffer_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/tests/buffer_test.ts')
-rw-r--r--cli/js/tests/buffer_test.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/tests/buffer_test.ts b/cli/js/tests/buffer_test.ts
index 9cfb71669..e45bcb976 100644
--- a/cli/js/tests/buffer_test.ts
+++ b/cli/js/tests/buffer_test.ts
@@ -65,7 +65,7 @@ async function empty(buf: Buffer, s: string, fub: Uint8Array): Promise<void> {
check(buf, s);
while (true) {
const r = await buf.read(fub);
- if (r === Deno.EOF) {
+ if (r === null) {
break;
}
s = s.slice(r);
@@ -231,8 +231,7 @@ unitTest(async function bufferTestGrow(): Promise<void> {
for (const growLen of [0, 100, 1000, 10000, 100000]) {
const buf = new Buffer(xBytes.buffer as ArrayBuffer);
// If we read, this affects buf.off, which is good to test.
- const result = await buf.read(tmp);
- const nread = result === Deno.EOF ? 0 : result;
+ const nread = (await buf.read(tmp)) ?? 0;
buf.grow(growLen);
const yBytes = repeat("y", growLen);
await buf.write(yBytes);