From 1cd1f7de70b8ee68d2f6757f2b38a712ea1f3876 Mon Sep 17 00:00:00 2001 From: Chris Knight Date: Thu, 16 Apr 2020 20:45:30 +0100 Subject: refactor: proper Node polyfill directory iteration now that Deno supports this (#4783) --- std/node/_fs/_fs_dir_test.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'std/node/_fs/_fs_dir_test.ts') diff --git a/std/node/_fs/_fs_dir_test.ts b/std/node/_fs/_fs_dir_test.ts index 6ee044391..5b3336201 100644 --- a/std/node/_fs/_fs_dir_test.ts +++ b/std/node/_fs/_fs_dir_test.ts @@ -90,6 +90,7 @@ test({ } ); const thirdRead: Dirent | null = await dir.read(); + const fourthRead: Dirent | null = await dir.read(); if (firstRead?.name === "foo.txt") { assertEquals(secondRead?.name, "bar.txt"); @@ -100,6 +101,7 @@ test({ } assert(secondCallback); assert(thirdRead === null); + assert(fourthRead === null); } finally { Deno.removeSync(testDir, { recursive: true }); } @@ -120,6 +122,7 @@ test({ const firstRead: Dirent | null = dir.readSync(); const secondRead: Dirent | null = dir.readSync(); const thirdRead: Dirent | null = dir.readSync(); + const fourthRead: Dirent | null = dir.readSync(); if (firstRead?.name === "foo.txt") { assertEquals(secondRead?.name, "bar.txt"); @@ -129,6 +132,7 @@ test({ fail("File not found during read"); } assert(thirdRead === null); + assert(fourthRead === null); } finally { Deno.removeSync(testDir, { recursive: true }); } -- cgit v1.2.3