diff options
Diffstat (limited to 'cli/js/tests/read_dir_test.ts')
-rw-r--r-- | cli/js/tests/read_dir_test.ts | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cli/js/tests/read_dir_test.ts b/cli/js/tests/read_dir_test.ts index 2c7f42103..f1c7ea121 100644 --- a/cli/js/tests/read_dir_test.ts +++ b/cli/js/tests/read_dir_test.ts @@ -4,19 +4,14 @@ import { unitTest, assert, assertEquals } from "./test_util.ts"; function assertSameContent(files: Deno.DirEntry[]): void { let counter = 0; - for (const file of files) { - if (file.name === "subdir") { - assert(file.isDirectory); - counter++; - } - - if (file.name === "002_hello.ts") { - assertEquals(file.mode!, Deno.statSync(`cli/tests/${file.name}`).mode!); + for (const entry of files) { + if (entry.name === "subdir") { + assert(entry.isDirectory); counter++; } } - assertEquals(counter, 2); + assertEquals(counter, 1); } unitTest({ perms: { read: true } }, function readdirSyncSuccess(): void { |