mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-22 11:57:27 +08:00
* Only run tests in <rootDir>/src (#544) * updates Jest to 19.0.2 * removes testPathIgnorePatterns from jest config * adds testMatch to jest config to only match files in src * Bump babel-jest to 19.0.0 to match jest 19.0.2
This commit is contained in:
@@ -26,19 +26,8 @@ module.exports = (resolve, rootDir, isEjecting) => {
|
||||
setupFiles: [resolve('config/polyfills.js')],
|
||||
setupTestFrameworkScriptFile: setupTestsFile,
|
||||
testMatch: [
|
||||
// Ignore the following directories:
|
||||
// build
|
||||
// - the build output directory
|
||||
// .cache
|
||||
// - the yarn module cache on Ubuntu if $HOME === rootDir
|
||||
// docs
|
||||
// - often used to publish to Github Pages
|
||||
// node_modules
|
||||
// - ignore tests in dependencies
|
||||
// scripts
|
||||
// - directory generated upon eject
|
||||
'<rootDir>/!(build|docs|node_modules|scripts)/**/__tests__/**/*.js?(x)',
|
||||
'<rootDir>/!(build|docs|node_modules|scripts)/**/?(*.)(spec|test).js?(x)',
|
||||
'<rootDir>/src/**/__tests__/**/*.js?(x)',
|
||||
'<rootDir>/src/**/?(*.)(spec|test).js?(x)'
|
||||
],
|
||||
testEnvironment: 'node',
|
||||
testURL: 'http://localhost',
|
||||
|
||||
Reference in New Issue
Block a user