Skip to content

Commit

Permalink
Only run tests directly in __tests__
Browse files Browse the repository at this point in the history
This lets us share code between test files by placing them in __tests__/utils.
  • Loading branch information
gaearon committed Nov 23, 2017
1 parent 62a323e commit 10c981f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/jest/config.source.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module.exports = {
},
setupFiles: [require.resolve('./setupEnvironment.js')],
setupTestFrameworkScriptFile: require.resolve('./setupTests.js'),
testRegex: '/__tests__/.*(\\.js|\\.coffee|[^d]\\.ts)$',
// Only include files directly in __tests__, not in nested folders.
testRegex: '/__tests__/[^/]*(\\.js|\\.coffee|[^d]\\.ts)$',
moduleFileExtensions: ['js', 'json', 'node', 'coffee', 'ts'],
rootDir: process.cwd(),
roots: ['<rootDir>/packages', '<rootDir>/scripts'],
Expand Down

0 comments on commit 10c981f

Please sign in to comment.