Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing options to the defaults object #6428

Merged
merged 3 commits into from
Jun 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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\\",
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions packages/jest-config/src/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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',
Expand All @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions types/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down