mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
Fixed Typo (#5495)
This commit is contained in:
parent
b34628a26a
commit
59cb3c14c7
1 changed files with 8 additions and 8 deletions
|
@ -30,7 +30,7 @@ Deno.test("emptyDirIfItNotExist", async function (): Promise<void> {
|
|||
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<void> {
|
|||
|
||||
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<void> => {
|
||||
await Deno.stat(testNestDir);
|
||||
}
|
||||
);
|
||||
|
||||
// test file have been remove
|
||||
// test file have been removed
|
||||
await assertThrowsAsync(
|
||||
async (): Promise<void> => {
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue