question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

reportFile should allow TypeScript tests

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kumar303commented, Jan 16, 2019

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.

1reaction
kamranayubcommented, Jan 11, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How setting up unit tests with TypeScript - Medium
Anyway, this little trick allows specifying the properties just for the ts-node, so your IDE will continue to use the original tsconfig to...
Read more >
Javascript/Typescript test coverage - SonarQube Documentation
SonarQube supports the reporting of test coverage information as part of the analysis of your JS/TS project.
Read more >
JavaScript/TypeScript Test Coverage - SonarCloud Docs
Set up test coverage for JavaScript/TypeScript projects. ... This parameter must be set to the path of the report file produced by your...
Read more >
How To Generate Mocha Reports With Mochawesome?
Mochawesome is a custom Mocha reporter that allows you to create ... You can add extra context information to tests like console logs, ......
Read more >
Don't see Unit Tests count in Dashboard (Node.js & Angular)
But after adding the Unit Test report, we don't see it in SonarQube's dashboard. ... TypeScript Code covarge sonar.typescript.lcov.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found