-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move jest configuration into config files (#6861)
* chore: move jest configuration into config files * move reporter config into the js file * moar coverage * Update jest.config.js
- Loading branch information
1 parent
5206280
commit c5389cb
Showing
4 changed files
with
67 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
// TODO: Configure the reporter directly: https://github.com/rickhanlonii/jest-silent-reporter/commit/e9a306210f89fa22705823f4c920ed4eecdfb83d#r30109923 | ||
process.env.JEST_SILENT_REPORTER_DOTS = true; | ||
|
||
// Object spread is just node 8 | ||
module.exports = Object.assign({}, require('./jest.config'), { | ||
reporters: [ | ||
['jest-junit', {output: 'reports/junit/js-test-results.xml'}], | ||
'jest-silent-reporter', | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
collectCoverageFrom: [ | ||
'**/packages/*/**/*.js', | ||
'!**/bin/**', | ||
'!**/cli/**', | ||
'!**/perf/**', | ||
'!**/__mocks__/**', | ||
'!**/__tests__/**', | ||
'!e2e/**', | ||
], | ||
coverageReporters: ['json'], | ||
modulePathIgnorePatterns: [ | ||
'examples/.*', | ||
'packages/.*/build', | ||
'packages/.*/build-es5', | ||
'packages/jest-runtime/src/__tests__/test_root.*', | ||
'website/.*', | ||
'e2e/runtime-internal-module-registry/__mocks__', | ||
], | ||
projects: ['<rootDir>', '<rootDir>/examples/*/'], | ||
setupTestFrameworkScriptFile: '<rootDir>/testSetupFile.js', | ||
snapshotSerializers: [ | ||
'<rootDir>/packages/pretty-format/build/plugins/convert_ansi.js', | ||
], | ||
testEnvironment: './packages/jest-environment-node', | ||
testPathIgnorePatterns: [ | ||
'/node_modules/', | ||
'/examples/', | ||
'/e2e/.*/__tests__', | ||
'\\.snap$', | ||
'/packages/.*/build', | ||
'/packages/.*/build-es5', | ||
'/packages/.*/src/__tests__/expect_util.js', | ||
'/packages/jest-cli/src/__tests__/test_root', | ||
'/packages/jest-cli/src/__tests__/__fixtures__/', | ||
'/packages/jest-cli/src/lib/__tests__/fixtures/', | ||
'/packages/jest-haste-map/src/__tests__/haste_impl.js', | ||
'/packages/jest-resolve-dependencies/src/__tests__/__fixtures__/', | ||
'/packages/jest-runtime/src/__tests__/defaultResolver.js', | ||
'/packages/jest-runtime/src/__tests__/module_dir/', | ||
'/packages/jest-runtime/src/__tests__/NODE_PATH_dir', | ||
'/packages/jest-snapshot/src/__tests__/plugins', | ||
'/packages/jest-validate/src/__tests__/fixtures/', | ||
'/packages/jest-worker/src/__performance_tests__', | ||
'/packages/pretty-format/perf/test.js', | ||
'/e2e/__tests__/iterator-to-null-test.js', | ||
], | ||
transform: { | ||
'^.+\\.js$': '<rootDir>/packages/babel-jest', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters