From 93f7f00c956c14620ef031626f124b57397ca867 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 9 Oct 2019 17:22:22 -0400 Subject: Run deno_std tests in github actions --- std/fs/ensure_file_test.ts | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'std/fs/ensure_file_test.ts') diff --git a/std/fs/ensure_file_test.ts b/std/fs/ensure_file_test.ts index 56f180786..fa27133ab 100644 --- a/std/fs/ensure_file_test.ts +++ b/std/fs/ensure_file_test.ts @@ -14,9 +14,11 @@ test(async function ensureFileIfItNotExist(): Promise { await assertThrowsAsync( async (): Promise => { - await Deno.stat(testFile).then((): void => { - throw new Error("test file should exists."); - }); + await Deno.stat(testFile).then( + (): void => { + throw new Error("test file should exists."); + } + ); } ); @@ -29,10 +31,12 @@ test(function ensureFileSyncIfItNotExist(): void { ensureFileSync(testFile); - assertThrows((): void => { - Deno.statSync(testFile); - throw new Error("test file should exists."); - }); + assertThrows( + (): void => { + Deno.statSync(testFile); + throw new Error("test file should exists."); + } + ); Deno.removeSync(testDir, { recursive: true }); }); @@ -48,9 +52,11 @@ test(async function ensureFileIfItExist(): Promise { await assertThrowsAsync( async (): Promise => { - await Deno.stat(testFile).then((): void => { - throw new Error("test file should exists."); - }); + await Deno.stat(testFile).then( + (): void => { + throw new Error("test file should exists."); + } + ); } ); @@ -66,10 +72,12 @@ test(function ensureFileSyncIfItExist(): void { ensureFileSync(testFile); - assertThrows((): void => { - Deno.statSync(testFile); - throw new Error("test file should exists."); - }); + assertThrows( + (): void => { + Deno.statSync(testFile); + throw new Error("test file should exists."); + } + ); Deno.removeSync(testDir, { recursive: true }); }); -- cgit v1.2.3