Skip to content
New issue

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

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

Already on GitHub? # to your account

npm test doesn't find files in CRA3 #6809

Closed
TomasHubelbauer opened this issue Apr 12, 2019 · 1 comment
Closed

npm test doesn't find files in CRA3 #6809

TomasHubelbauer opened this issue Apr 12, 2019 · 1 comment

Comments

@TomasHubelbauer
Copy link
Contributor

I have run into an issue where npm test which works perfectly with current stable CRA doesn't work with CRA3 if the testing instructions in the docs are followed.

I have created a repro showcasing this deterministically, just run npm test in it.

The steps to reproduce are:

  1. npm create-react-app . --typescript
  2. npm install --save enzyme enzyme-adapter-react-16 react-test-renderer
  3. npm install --save-dev @types/enzyme @types/enzyme-adapter-react-16
  4. setupTests.ts as per https://facebook.github.io/create-react-app/docs/running-tests#src-setuptestsjs
  5. npm test still works!
  6. npm install react-scripts@3.0.0-next.b0cbf2ca Roadmap for version 3.0 #6475
  7. npm test now says it cannot find any files! App.test.tsx sits right there.

Now sure if this is caused by TypeScript or not, I have not tried to see if this reproduces with the JavaScript version of CRA3.

@ianschmitz
Copy link
Contributor

Sounds like #6313 will solve your problem. Can you confirm?

@lock lock bot locked and limited conversation to collaborators Apr 20, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants