Skip to content

Commit

Permalink
have a default for collectCoverageFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 17, 2019
1 parent 454a68e commit 5f9e417
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/jest-config/src/Defaults.ts
Expand Up @@ -21,7 +21,7 @@ const defaultOptions: Config.DefaultOptions = {
changedFilesWithAncestor: false,
clearMocks: false,
collectCoverage: false,
collectCoverageFrom: null,
collectCoverageFrom: [],
coverageDirectory: null,
coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
coverageReporters: ['json', 'text', 'lcov', 'clover'],
Expand Down
9 changes: 1 addition & 8 deletions packages/jest-runtime/src/index.ts
Expand Up @@ -178,14 +178,7 @@ class Runtime {
}
}

// TODO: Make this `static shouldInstrument = shouldInstrument;` after https://github.com/facebook/jest/issues/7846
static shouldInstrument(
filename: Config.Path,
options: ShouldInstrumentOptions,
config: Config.ProjectConfig,
) {
return shouldInstrument(filename, options, config);
}
static shouldInstrument = shouldInstrument;

static createContext(
config: Config.ProjectConfig,
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-types/src/Config.ts
Expand Up @@ -36,7 +36,7 @@ export type DefaultOptions = {
changedFilesWithAncestor: boolean;
clearMocks: boolean;
collectCoverage: boolean;
collectCoverageFrom: Array<string> | null | undefined;
collectCoverageFrom: Array<string>;
coverageDirectory: string | null | undefined;
coveragePathIgnorePatterns: Array<string>;
coverageReporters: Array<string>;
Expand Down

0 comments on commit 5f9e417

Please sign in to comment.