Skip to content

Commit

Permalink
Add tsconfig.test.json (instead of using deprecated TS_CONFIG)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaserny committed Jul 25, 2017
1 parent 5028178 commit e1224ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/react-scripts/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module.exports = {
testsSetup: resolveApp('src/setupTests.ts'),
appNodeModules: resolveApp('node_modules'),
appTsConfig: resolveApp('tsconfig.json'),
appTsTestConfig: resolveApp('tsconfig.test.json'),
publicUrl: getPublicUrl(resolveApp('package.json')),
servedPath: getServedPath(resolveApp('package.json')),
// These properties only exist before ejecting:
Expand Down Expand Up @@ -112,6 +113,7 @@ if (
testsSetup: resolveOwn('template/src/setupTests.ts'),
appNodeModules: resolveOwn('node_modules'),
appTsConfig: resolveOwn('template/tsconfig.json'),
appTsTestConfig: resolveOwn('template/tsconfig.test.json'),
publicUrl: getPublicUrl(resolveOwn('package.json')),
servedPath: getServedPath(resolveOwn('package.json')),
// These properties only exist before ejecting:
Expand Down
5 changes: 1 addition & 4 deletions packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@ module.exports = (resolve, rootDir) => {
'^react-native$': 'react-native-web',
},
globals: {
__TS_CONFIG__: {
module: 'commonjs',
},
'ts-jest': {
tsConfigFile: paths.appTsConfig,
tsConfigFile: paths.appTsTestConfig,
},
},
};
Expand Down

0 comments on commit e1224ed

Please sign in to comment.