Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit d1ab3f1

Browse files
authored
Merge pull request #68 from jonmpqts/master
Fix setupTests extension
2 parents 057fe66 + 712d6db commit d1ab3f1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/react-scripts/config/paths.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module.exports = {
5858
appPackageJson: resolveApp('package.json'),
5959
appSrc: resolveApp('src'),
6060
yarnLockFile: resolveApp('yarn.lock'),
61-
testsSetup: resolveApp('src/setupTests.js'),
61+
testsSetup: resolveApp('src/setupTests.ts'),
6262
appNodeModules: resolveApp('node_modules'),
6363
publicUrl: getPublicUrl(resolveApp('package.json')),
6464
servedPath: getServedPath(resolveApp('package.json')),
@@ -78,7 +78,7 @@ module.exports = {
7878
appPackageJson: resolveApp('package.json'),
7979
appSrc: resolveApp('src'),
8080
yarnLockFile: resolveApp('yarn.lock'),
81-
testsSetup: resolveApp('src/setupTests.js'),
81+
testsSetup: resolveApp('src/setupTests.ts'),
8282
appNodeModules: resolveApp('node_modules'),
8383
publicUrl: getPublicUrl(resolveApp('package.json')),
8484
servedPath: getServedPath(resolveApp('package.json')),
@@ -107,7 +107,7 @@ if (
107107
appPackageJson: resolveOwn('package.json'),
108108
appSrc: resolveOwn('template/src'),
109109
yarnLockFile: resolveOwn('template/yarn.lock'),
110-
testsSetup: resolveOwn('template/src/setupTests.js'),
110+
testsSetup: resolveOwn('template/src/setupTests.ts'),
111111
appNodeModules: resolveOwn('node_modules'),
112112
publicUrl: getPublicUrl(resolveOwn('package.json')),
113113
servedPath: getServedPath(resolveOwn('package.json')),

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = (resolve, rootDir) => {
1717
// Use this instead of `paths.testsSetup` to avoid putting
1818
// an absolute filename into configuration after ejecting.
1919
const setupTestsFile = fs.existsSync(paths.testsSetup)
20-
? '<rootDir>/src/setupTests.js'
20+
? '<rootDir>/src/setupTests.ts'
2121
: undefined;
2222

2323
// TODO: I don't know if it's safe or not to just use / as path separator

0 commit comments

Comments
 (0)