Skip to content

Commit 6e7347e

Browse files
committed
always set collectCoverageFrom
1 parent 454a68e commit 6e7347e

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

packages/jest-config/src/normalize.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,8 @@ export default function normalize(
10101010
}
10111011

10121012
newOptions.collectCoverageFrom = collectCoverageFrom;
1013+
} else if (!newOptions.collectCoverageFrom) {
1014+
newOptions.collectCoverageFrom = [];
10131015
}
10141016

10151017
return {

packages/jest-runtime/src/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,7 @@ class Runtime {
178178
}
179179
}
180180

181-
// TODO: Make this `static shouldInstrument = shouldInstrument;` after https://github.com/facebook/jest/issues/7846
182-
static shouldInstrument(
183-
filename: Config.Path,
184-
options: ShouldInstrumentOptions,
185-
config: Config.ProjectConfig,
186-
) {
187-
return shouldInstrument(filename, options, config);
188-
}
181+
static shouldInstrument = shouldInstrument;
189182

190183
static createContext(
191184
config: Config.ProjectConfig,

0 commit comments

Comments
 (0)