summaryrefslogtreecommitdiff
path: root/std/testing/mod.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2019-11-14 05:42:34 +1100
committerRy Dahl <ry@tinyclouds.org>2019-11-13 13:42:34 -0500
commit9837d324a7c3f5e1c850dadabfd670edad4aa85b (patch)
treea81de8e9e15f64edd2ccb6e30a351ca3b2305035 /std/testing/mod.ts
parent279191ad9447c66fe1278589a7be242d035bb68b (diff)
Update to TypeScript 3.7 (#3275)
and update to prettier 1.19 Also, update `assert()` and remove not null assertions where possibly in `cli`. Closes #3273
Diffstat (limited to 'std/testing/mod.ts')
-rw-r--r--std/testing/mod.ts38
1 files changed, 16 insertions, 22 deletions
diff --git a/std/testing/mod.ts b/std/testing/mod.ts
index bd7642b81..3b6386d5b 100644
--- a/std/testing/mod.ts
+++ b/std/testing/mod.ts
@@ -203,14 +203,12 @@ 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(
@@ -321,14 +319,12 @@ 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);
@@ -336,15 +332,13 @@ 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;
}