diff options
Diffstat (limited to 'js/files_test.ts')
-rw-r--r-- | js/files_test.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/files_test.ts b/js/files_test.ts index 7e5bbf5f0..0decd9f00 100644 --- a/js/files_test.ts +++ b/js/files_test.ts @@ -198,4 +198,10 @@ testPerm({ read: true }, async function seekMode() { assert(!!err); assertEquals(err.kind, Deno.ErrorKind.InvalidSeekMode); assertEquals(err.name, "InvalidSeekMode"); + + // We should still be able to read the file + // since it is still open. + let buf = new Uint8Array(1); + await file.read(buf); // "H" + assertEquals(new TextDecoder().decode(buf), "H"); }); |