Skip to content

Commit

Permalink
add missing options to the defaults object (#6428)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranyitz authored and SimenB committed Jun 10, 2018
1 parent eb096f8 commit 397d7c1
Showing 5 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

### Fixes

- `[jest-config]` Add missing options to the `defaults` object ([#6428](https://github.com/facebook/jest/pull/6428))
- `[expect]` Using symbolic property names in arrays no longer causes the `toEqual` matcher to fail ([#6391](https://github.com/facebook/jest/pull/6391))
- `[expect]` `toEqual` no longer tries to compare non-enumerable symbolic properties, to be consistent with non-symbolic properties. ([#6398](https://github.com/facebook/jest/pull/6398))

Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ exports[`moduleNameMapper wrong configuration 1`] = `
\\"moduleNameMapper\\": {
\\"/\\\\.(css|less)$/\\": \\"no-such-module\\"
},
\\"resolver\\": undefined
\\"resolver\\": null
"
`;
6 changes: 6 additions & 0 deletions e2e/__tests__/__snapshots__/show_config.test.js.snap
Original file line number Diff line number Diff line change
@@ -35,13 +35,15 @@ exports[`--showConfig outputs config info and exits 1`] = `
\\"name\\": \\"[md5 hash]\\",
\\"resetMocks\\": false,
\\"resetModules\\": false,
\\"resolver\\": null,
\\"restoreMocks\\": false,
\\"rootDir\\": \\"<<REPLACED_ROOT_DIR>>\\",
\\"roots\\": [
\\"<<REPLACED_ROOT_DIR>>\\"
],
\\"runner\\": \\"jest-runner\\",
\\"setupFiles\\": [],
\\"setupTestFrameworkScriptFile\\": null,
\\"skipFilter\\": false,
\\"snapshotSerializers\\": [],
\\"testEnvironment\\": \\"jest-environment-jsdom\\",
@@ -73,13 +75,16 @@ exports[`--showConfig outputs config info and exits 1`] = `
\\"globalConfig\\": {
\\"bail\\": false,
\\"changedFilesWithAncestor\\": false,
\\"collectCoverage\\": false,
\\"collectCoverageFrom\\": null,
\\"coverageDirectory\\": \\"<<REPLACED_ROOT_DIR>>/coverage\\",
\\"coverageReporters\\": [
\\"json\\",
\\"text\\",
\\"lcov\\",
\\"clover\\"
],
\\"coverageThreshold\\": null,
\\"detectLeaks\\": false,
\\"detectOpenHandles\\": false,
\\"errorOnDeprecated\\": false,
@@ -94,6 +99,7 @@ exports[`--showConfig outputs config info and exits 1`] = `
\\"notify\\": false,
\\"notifyMode\\": \\"always\\",
\\"passWithNoTests\\": false,
\\"projects\\": null,
\\"rootDir\\": \\"<<REPLACED_ROOT_DIR>>\\",
\\"runTestsByPath\\": false,
\\"skipFilter\\": false,
12 changes: 12 additions & 0 deletions packages/jest-config/src/defaults.js
Original file line number Diff line number Diff line change
@@ -35,8 +35,12 @@ export default ({
cacheDirectory,
changedFilesWithAncestor: false,
clearMocks: false,
collectCoverage: false,
collectCoverageFrom: null,
coverageDirectory: null,
coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
coverageReporters: ['json', 'text', 'lcov', 'clover'],
coverageThreshold: null,
detectLeaks: false,
detectOpenHandles: false,
errorOnDeprecated: false,
@@ -57,11 +61,17 @@ export default ({
notify: false,
notifyMode: 'always',
preset: null,
projects: null,
resetMocks: false,
resetModules: false,
resolver: null,
restoreMocks: false,
rootDir: null,
roots: ['<rootDir>'],
runTestsByPath: false,
runner: 'jest-runner',
setupFiles: [],
setupTestFrameworkScriptFile: null,
skipFilter: false,
snapshotSerializers: [],
testEnvironment: 'jest-environment-jsdom',
@@ -72,8 +82,10 @@ export default ({
testPathIgnorePatterns: [NODE_MODULES_REGEXP],
testRegex: '',
testResultsProcessor: null,
testRunner: 'jasmine2',
testURL: 'about:blank',
timers: 'real',
transform: null,
transformIgnorePatterns: [NODE_MODULES_REGEXP],
useStderr: false,
verbose: null,
12 changes: 12 additions & 0 deletions types/Config.js
Original file line number Diff line number Diff line change
@@ -29,8 +29,12 @@ export type DefaultOptions = {|
cacheDirectory: Path,
changedFilesWithAncestor: boolean,
clearMocks: boolean,
collectCoverage: boolean,
collectCoverageFrom: ?Array<string>,
coverageDirectory: ?string,
coveragePathIgnorePatterns: Array<string>,
coverageReporters: Array<string>,
coverageThreshold: ?{global: {[key: string]: number}},
errorOnDeprecated: boolean,
expand: boolean,
filter: ?Path,
@@ -49,11 +53,17 @@ export type DefaultOptions = {|
notify: boolean,
notifyMode: string,
preset: ?string,
projects: ?Array<string | ProjectConfig>,
resetMocks: boolean,
resetModules: boolean,
resolver: ?Path,
restoreMocks: boolean,
rootDir: ?Path,
roots: ?Array<Path>,
runner: string,
runTestsByPath: boolean,
setupFiles: Array<Path>,
setupTestFrameworkScriptFile: ?Path,
skipFilter: boolean,
snapshotSerializers: Array<Path>,
testEnvironment: string,
@@ -64,8 +74,10 @@ export type DefaultOptions = {|
testPathIgnorePatterns: Array<string>,
testRegex: string,
testResultsProcessor: ?string,
testRunner: ?string,
testURL: string,
timers: 'real' | 'fake',
transform: ?{[key: string]: string},
transformIgnorePatterns: Array<Glob>,
watchPathIgnorePatterns: Array<string>,
useStderr: boolean,

0 comments on commit 397d7c1

Please sign in to comment.