Skip to content

Commit

Permalink
fix: always resolve "jest-environment-jsdom" from jest-config
Browse files Browse the repository at this point in the history
Closes #7064
  • Loading branch information
aleclarson committed Dec 6, 2018
1 parent 6a2237d commit 72bc39b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/jest-config/src/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,12 +401,10 @@ export default function normalize(options: InitialOptions, argv: Argv) {
options = setupPreset(options, options.preset);
}

if (options.testEnvironment) {
options.testEnvironment = getTestEnvironment({
rootDir: options.rootDir,
testEnvironment: options.testEnvironment,
});
}
options.testEnvironment = getTestEnvironment({
rootDir: options.rootDir,
testEnvironment: options.testEnvironment || 'jsdom',
});

if (!options.roots && options.testPathDirs) {
options.roots = options.testPathDirs;
Expand Down

0 comments on commit 72bc39b

Please sign in to comment.