Create-react-app: reportFile should allow TypeScript tests

Created on 10 Jan 2019  路  5Comments  路  Source: facebook/create-react-app

Is this a bug report? No

I'm using CRA with TypeScript and followed the docs to integrate typescript.

My problem is that npm run build does not fail when there is a TypeScript error in the tests. I noticed that the webpack.config.js ignores errors in test files. See the reportFiles array. It would be awesome to report TypeScript errors in test files too so that a team can know if a change caused a TypeScript error in a test.

Alternatively, npm test should report TypeScript errors.

typescript stale

Most helpful comment

This looks like a dupe of https://github.com/facebook/create-react-app/issues/5626

Our current workaround is to run tsc as a CI build step. This will report type errors in test files.

All 5 comments

Note too in the react-scripts-ts fork this was supported so those of us migrating to CRA from there would expect this.

This looks like a dupe of https://github.com/facebook/create-react-app/issues/5626

Our current workaround is to run tsc as a CI build step. This will report type errors in test files.

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

Closing as dupe of #5626.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dualcnhq picture dualcnhq  路  3Comments

Aranir picture Aranir  路  3Comments

rdamian3 picture rdamian3  路  3Comments

stopachka picture stopachka  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments