Skip to content

Commit d622c15

Browse files
authored
fix: use correct logic to set collect coverage (#97)
1 parent 89bf57f commit d622c15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ if (onlyFailures && testNamePattern !== null) {
5959

6060
// if enabled testcase or testNamePattern or onlyFailures, disable collectCoverage by default
6161
const collectCoverage =
62-
Boolean(options.collectCoverage) ||
63-
config.collectCoverage ||
62+
(options.collectCoverage === "false" ? false : options.collectCoverage === "true" ? true : null) ??
63+
config.collectCoverage ??
6464
(testFiles === null && options.testNamePattern === undefined && !onlyFailures);
6565

6666
const getBoolean = (optionValue, configValue) => {

0 commit comments

Comments
 (0)