react-app-rewire-typescript
react-app-rewire-typescript copied to clipboard
Run typescript tests
Thank you for creating this plugin, I successfully integrated it with create-react-app and antd. However when I'm running the tests, files with *.test.ts are not being detected.
Here is my package.json scripts
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
"eject": "react-app-rewired eject"
},
Is there an extra step I need to do?
This repo currently doesn't cover running .ts tests. It's just the Webpack build (which is totally separate from all the stuff that create-react-app does with Jest).
So far we haven't found a good way to get react-scripts to work automatically with Jest + Typescript, so our own project is currently just using ts-jest with a manual configuration in package.json. However, we welcome suggestions or PRs to integrate this if anyone finds a working configuration for it with create-react-app.
I see, I think we have the same setup. I'm keeping an eye with this pull request from the react-app-rewire repo. https://github.com/timarney/react-app-rewired/pull/109. Any thoughts?
I've just put in a PR for this, #8 that uses the new support for rewiring jest configs in react-app-rewired.