diff options
Diffstat (limited to 'std/node/_fs/_fs_dir_test.ts')
-rw-r--r-- | std/node/_fs/_fs_dir_test.ts | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/std/node/_fs/_fs_dir_test.ts b/std/node/_fs/_fs_dir_test.ts index aefa85854..3b8c5b341 100644 --- a/std/node/_fs/_fs_dir_test.ts +++ b/std/node/_fs/_fs_dir_test.ts @@ -71,8 +71,10 @@ test({ name: "Async read returns one file at a time", async fn() { const testDir: string = Deno.makeTempDirSync(); - Deno.createSync(testDir + "/foo.txt"); - Deno.createSync(testDir + "/bar.txt"); + const f1 = Deno.createSync(testDir + "/foo.txt"); + f1.close(); + const f2 = Deno.createSync(testDir + "/bar.txt"); + f2.close(); try { let secondCallback = false; @@ -108,8 +110,10 @@ test({ name: "Sync read returns one file at a time", fn() { const testDir: string = Deno.makeTempDirSync(); - Deno.createSync(testDir + "/foo.txt"); - Deno.createSync(testDir + "/bar.txt"); + const f1 = Deno.createSync(testDir + "/foo.txt"); + f1.close(); + const f2 = Deno.createSync(testDir + "/bar.txt"); + f2.close(); try { const dir: Dir = new Dir(testDir); @@ -135,8 +139,10 @@ test({ name: "Async iteration over existing directory", async fn() { const testDir: string = Deno.makeTempDirSync(); - Deno.createSync(testDir + "/foo.txt"); - Deno.createSync(testDir + "/bar.txt"); + const f1 = Deno.createSync(testDir + "/foo.txt"); + f1.close(); + const f2 = Deno.createSync(testDir + "/bar.txt"); + f2.close(); try { const dir: Dir = new Dir(testDir); |