Skip to content

Tests outside of src folder shouldn't be run #544

Closed
@gaelollivier

Description

The README.md says:
The .test.js / .spec.js files (or the __tests__ folders) can be located at any depth under the src top level folder.

However, if I create a .spec.js in a e2e folder at the root of the project, it is still executed by npm test

image

I guess that's a bug. Right now I can workaround by overriding the testPathPattern parameter in my package.json: react-scripts test --env=jsdom --testPathPattern ./src\/.*

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions