Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run typescript tests #1

Open
jaimesangcap opened this issue Oct 9, 2017 · 3 comments
Open

Run typescript tests #1

jaimesangcap opened this issue Oct 9, 2017 · 3 comments

Comments

@jaimesangcap
Copy link

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?

@icopp
Copy link
Contributor

icopp commented Oct 11, 2017

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.

@jaimesangcap
Copy link
Author

I see, I think we have the same setup. I'm keeping an eye with this pull request from the react-app-rewire repo. timarney/react-app-rewired#109. Any thoughts?

@christensena
Copy link

I've just put in a PR for this, #8 that uses the new support for rewiring jest configs in react-app-rewired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants