summaryrefslogtreecommitdiff
path: root/std/testing/mod.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/testing/mod.ts')
-rw-r--r--std/testing/mod.ts38
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;
}