mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Run deno_std tests in github actions
This commit is contained in:
parent
28293acd9c
commit
93f7f00c95
53 changed files with 668 additions and 877 deletions
|
@ -15,9 +15,11 @@ test(async function ensureDirIfItNotExist(): Promise<void> {
|
|||
|
||||
await assertThrowsAsync(
|
||||
async (): Promise<void> => {
|
||||
await Deno.stat(testDir).then((): void => {
|
||||
throw new Error("test dir should exists.");
|
||||
});
|
||||
await Deno.stat(testDir).then(
|
||||
(): void => {
|
||||
throw new Error("test dir should exists.");
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -46,9 +48,11 @@ test(async function ensureDirIfItExist(): Promise<void> {
|
|||
|
||||
await assertThrowsAsync(
|
||||
async (): Promise<void> => {
|
||||
await Deno.stat(testDir).then((): void => {
|
||||
throw new Error("test dir should still exists.");
|
||||
});
|
||||
await Deno.stat(testDir).then(
|
||||
(): void => {
|
||||
throw new Error("test dir should still exists.");
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -64,10 +68,12 @@ test(function ensureDirSyncIfItExist(): void {
|
|||
|
||||
ensureDirSync(testDir);
|
||||
|
||||
assertThrows((): void => {
|
||||
Deno.statSync(testDir);
|
||||
throw new Error("test dir should still exists.");
|
||||
});
|
||||
assertThrows(
|
||||
(): void => {
|
||||
Deno.statSync(testDir);
|
||||
throw new Error("test dir should still exists.");
|
||||
}
|
||||
);
|
||||
|
||||
Deno.removeSync(baseDir, { recursive: true });
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue