Skip to content

npm test doesn't find files in CRA3 #6809

Closed
@TomasHubelbauer

Description

@TomasHubelbauer

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 [email protected] 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions