diff --git a/std/fs/empty_dir_test.ts b/std/fs/empty_dir_test.ts index 254cf590ff..aff16f6a5c 100644 --- a/std/fs/empty_dir_test.ts +++ b/std/fs/empty_dir_test.ts @@ -30,7 +30,7 @@ Deno.test("emptyDirIfItNotExist", async function (): Promise { Deno.test("emptyDirSyncIfItNotExist", function (): void { const testDir = path.join(testdataDir, "empty_dir_test_2"); const testNestDir = path.join(testDir, "nest"); - // empty a dir which not exist. then it will create new one + // empty a dir which does not exist, then it will a create new one. emptyDirSync(testNestDir); try { @@ -61,20 +61,20 @@ Deno.test("emptyDirIfItExist", async function (): Promise { await emptyDir(testDir); - // after empty: file/directory have already remove + // after empty: file/directory have already been removed try { // test dir still there const stat = await Deno.stat(testDir); assertEquals(stat.isDirectory, true); - // nest directory have been remove + // nest directory have been removed await assertThrowsAsync( async (): Promise => { await Deno.stat(testNestDir); } ); - // test file have been remove + // test file have been removed await assertThrowsAsync( async (): Promise => { await Deno.stat(testDirFile); @@ -106,16 +106,16 @@ Deno.test("emptyDirSyncIfItExist", function (): void { // after empty: file/directory have already remove try { - // test dir still there + // test dir still present const stat = Deno.statSync(testDir); assertEquals(stat.isDirectory, true); - // nest directory have been remove + // nest directory have been removed assertThrows((): void => { Deno.statSync(testNestDir); }); - // test file have been remove + // test file have been removed assertThrows((): void => { Deno.statSync(testDirFile); }); @@ -235,7 +235,7 @@ for (const s of scenes) { } } finally { // Make the test rerunnable - // Otherwise would throw error due to mkdir fail. + // Otherwise it would throw an error due to mkdir fail. await Deno.remove(testfolder, { recursive: true }); // done }