diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-03-07 03:31:20 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 23:01:20 +0100 |
commit | 39d9281bb9359b823aa055119a21f7814e285eb4 (patch) | |
tree | 52560aa64f73c6489916bb05d2fe685ed2aded09 /tests/unit_node/_fs/_fs_stat_test.ts | |
parent | fed9dec92a281070521743c3b415dd653f80b3ae (diff) |
fix(ext/node): add default methods to fs.StatsBase (#22750)
Diffstat (limited to 'tests/unit_node/_fs/_fs_stat_test.ts')
-rw-r--r-- | tests/unit_node/_fs/_fs_stat_test.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit_node/_fs/_fs_stat_test.ts b/tests/unit_node/_fs/_fs_stat_test.ts index bdca51502..2f9ab5214 100644 --- a/tests/unit_node/_fs/_fs_stat_test.ts +++ b/tests/unit_node/_fs/_fs_stat_test.ts @@ -129,3 +129,17 @@ Deno.test("[std/node/fs] stat callback isn't called twice if error is thrown", a }, }); }); + +Deno.test({ + name: "[std/node/fs] stat default methods", + fn() { + const stats = new Stats(); + assertEquals(stats.isFile(), false); + assertEquals(stats.isDirectory(), false); + assertEquals(stats.isBlockDevice(), false); + assertEquals(stats.isCharacterDevice(), false); + assertEquals(stats.isSymbolicLink(), false); + assertEquals(stats.isFIFO(), false); + assertEquals(stats.isSocket(), false); + }, +}); |