diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-10-09 17:22:22 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-10-09 17:22:22 -0400 |
commit | 93f7f00c956c14620ef031626f124b57397ca867 (patch) | |
tree | c5a9f536e79d2c8d2d02897511a9138acaf35394 /std/testing/mod.ts | |
parent | 28293acd9c12a94f5d769706291032e844c7b92b (diff) |
Run deno_std tests in github actions
Diffstat (limited to 'std/testing/mod.ts')
-rw-r--r-- | std/testing/mod.ts | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/std/testing/mod.ts b/std/testing/mod.ts index 3b6386d5b..bd7642b81 100644 --- a/std/testing/mod.ts +++ b/std/testing/mod.ts @@ -203,12 +203,14 @@ function report(result: TestResult): void { } function printFailedSummary(results: TestResults): void { - results.cases.forEach((v): void => { - if (!v.ok) { - console.error(`${RED_BG_FAIL} ${red(v.name)}`); - console.error(v.error); + results.cases.forEach( + (v): void => { + if (!v.ok) { + console.error(`${RED_BG_FAIL} ${red(v.name)}`); + console.error(v.error); + } } - }); + ); } function printResults( @@ -319,12 +321,14 @@ async function runTestsSerial( print( GREEN_OK + " " + name + " " + promptTestTime(end - start, true) ); - results.cases.forEach((v): void => { - if (v.name === name) { - v.ok = true; - v.printed = true; + results.cases.forEach( + (v): void => { + if (v.name === name) { + v.ok = true; + v.printed = true; + } } - }); + ); } catch (err) { if (disableLog) { print(CLEAR_LINE, false); @@ -332,13 +336,15 @@ async function runTestsSerial( print(`${RED_FAILED} ${name}`); print(err.stack); stats.failed++; - results.cases.forEach((v): void => { - if (v.name === name) { - v.error = err; - v.ok = false; - v.printed = true; + results.cases.forEach( + (v): void => { + if (v.name === name) { + v.error = err; + v.ok = false; + v.printed = true; + } } - }); + ); if (exitOnFail) { break; } |