summaryrefslogtreecommitdiff
path: root/cli/tests/unit/buffer_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/buffer_test.ts')
-rw-r--r--cli/tests/unit/buffer_test.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/unit/buffer_test.ts b/cli/tests/unit/buffer_test.ts
index a5a0147ab..23e655a05 100644
--- a/cli/tests/unit/buffer_test.ts
+++ b/cli/tests/unit/buffer_test.ts
@@ -7,6 +7,8 @@ import {
assertEquals,
assert,
assertStringContains,
+ assertThrows,
+ assertThrowsAsync,
unitTest,
} from "./test_util.ts";
@@ -202,6 +204,9 @@ unitTest(async function bufferReadFrom(): Promise<void> {
const fub = new Uint8Array(testString.length);
await empty(b, s, fub);
}
+ assertThrowsAsync(async function () {
+ await new Buffer().readFrom(null!);
+ });
});
unitTest(async function bufferReadFromSync(): Promise<void> {
@@ -221,6 +226,9 @@ unitTest(async function bufferReadFromSync(): Promise<void> {
const fub = new Uint8Array(testString.length);
await empty(b, s, fub);
}
+ assertThrows(function () {
+ new Buffer().readFromSync(null!);
+ });
});
unitTest(async function bufferTestGrow(): Promise<void> {