diff options
Diffstat (limited to 'tests/unit_node/fs_test.ts')
-rw-r--r-- | tests/unit_node/fs_test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit_node/fs_test.ts b/tests/unit_node/fs_test.ts index e62a246fa..a241189a5 100644 --- a/tests/unit_node/fs_test.ts +++ b/tests/unit_node/fs_test.ts @@ -7,6 +7,7 @@ import { constants, createWriteStream, existsSync, + lstatSync, mkdtempSync, promises, readFileSync, @@ -156,3 +157,11 @@ Deno.test("[node/fs createWriteStream", async () => { await Deno.remove(tempDir, { recursive: true }); } }); + +Deno.test( + "[node/fs lstatSync] supports throwIfNoEntry option", + () => { + const result = lstatSync("non-existing-path", { throwIfNoEntry: false }); + assertEquals(result, undefined); + }, +); |