Skip to content

Commit b6442bd

Browse files
committed
Added correct path
1 parent 9e5dbba commit b6442bd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/react-scripts/scripts/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ argv.push(
5252
JSON.stringify(
5353
createJestConfig(
5454
relativePath => path.resolve(__dirname, '..', relativePath),
55-
path.resolve(paths.appSrc, '..'),
55+
path.resolve(paths.appSrc, '../../'),
5656
false
5757
)
5858
)

packages/react-scripts/scripts/utils/createJestConfig.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ module.exports = (resolve, rootDir, isEjecting) => {
1515
// Use this instead of `paths.testsSetup` to avoid putting
1616
// an absolute filename into configuration after ejecting.
1717
const setupTestsFile = fs.existsSync(paths.testsSetup)
18-
? '<rootDir>/src/setupTests.js'
18+
? '<rootDir>/www/src/setupTests.js'
1919
: undefined;
2020

2121
// TODO: I don't know if it's safe or not to just use / as path separator
2222
// in Jest configs. We need help from somebody with Windows to determine this.
2323
const config = {
24-
collectCoverageFrom: ['src/**/*.{js,jsx}'],
24+
collectCoverageFrom: ['www/**/*.{js,jsx}'],
2525
setupFiles: ['react-app-polyfill/jsdom'],
2626
setupTestFrameworkScriptFile: setupTestsFile,
2727
testMatch: [
28-
'<rootDir>/src/**/__tests__/**/*.{js,jsx}',
29-
'<rootDir>/src/**/?(*.)(spec|test).{js,jsx}',
28+
'<rootDir>/www/src/**/__tests__/**/*.{js,jsx}',
29+
'<rootDir>/www/src/**/?(*.)(spec|test).{js,jsx}',
3030
],
3131
testEnvironment: 'jsdom',
3232
testURL: 'http://localhost',

0 commit comments

Comments
 (0)