summaryrefslogtreecommitdiff
path: root/cli/js/files_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/files_test.ts')
-rw-r--r--cli/js/files_test.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/js/files_test.ts b/cli/js/files_test.ts
index 2eaa3b9be..cb33f6947 100644
--- a/cli/js/files_test.ts
+++ b/cli/js/files_test.ts
@@ -118,6 +118,10 @@ testPerm(
const filename = tempDir + "hello.txt";
const file = await Deno.open(filename, "w+");
+ // reading into an empty buffer should return 0 immediately
+ const bytesRead = await file.read(new Uint8Array(0));
+ assert(bytesRead === 0);
+
// reading file into null buffer should throw an error
let err;
try {