Run deno_std tests in github actions

This commit is contained in:
Ryan Dahl 2019-10-09 17:22:22 -04:00
parent 28293acd9c
commit 93f7f00c95
No known key found for this signature in database
GPG key ID: C6F2E2494922A6BA
53 changed files with 668 additions and 877 deletions

View file

@ -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 });
});