Skip to content

Commit 1ca0d45

Browse files
test_runner: set level for coverage threshold
Updated coverage threshold checks in to use the parameter when calling. Errors now use the 'error' level for red-colored formatting. This ensures coverage errors are highlighted effectively in the output. Fixes: #55922
1 parent 2ac841c commit 1ca0d45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/test_runner/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ class Test extends AsyncResource {
10871087
if (actual < threshold) {
10881088
harness.success = false;
10891089
process.exitCode = kGenericUserError;
1090-
reporter.diagnostic(nesting, loc, `Error: ${NumberPrototypeToFixed(actual, 2)}% ${name} coverage does not meet threshold of ${threshold}%.`);
1090+
reporter.diagnostic(nesting, loc, `Error: ${NumberPrototypeToFixed(actual, 2)}% ${name} coverage does not meet threshold of ${threshold}%.`, 'error');
10911091
}
10921092
}
10931093

0 commit comments

Comments
 (0)