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

npm test: no tests found - watchman? #4720

Closed
Wancieho opened this issue Jul 2, 2018 · 1 comment
Closed

npm test: no tests found - watchman? #4720

Wancieho opened this issue Jul 2, 2018 · 1 comment

Comments

@Wancieho
Copy link

Wancieho commented Jul 2, 2018

Is this a bug report?

Yes

As per issue #2889 I'm having the same problem. The solutions in issue 2889 discuss removing the watchman path variable. Where is the path located?

If I install to the same directory where I initially installed watchman I always get the no tests found error but if I specify a new directory npm test works.

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

The search terms returned the 2889 issue but the solution is not clear.

Environment

Does not work I get below output:

`Please specify the project directory:
create-react-app

For example:
create-react-app my-react-app

Run create-react-app --help to see all options.`

Steps to Reproduce

  1. Install to project directory using npx create-react-app
  2. CD into project
  3. Install watchman
  4. Run npm test and receive no tests found error
  5. CD up 1 directory
  6. rm -rf project
  7. Install to project directory again using npx create-react-app
  8. CD into project and do not install watchman
  9. Run npm test - still no tests found

Expected Behavior

If watchman is interfering with a npx create-react-app then why after I delete the project does the problem persist if I create in the same directory again? I would expect that if watchman is the issue that a fresh create-react-app should be able to run tests. If the watchman var must be removed then where is this path located?

Actual Behavior

No tests will run if watchman has ever been installed to that folder before.

Reproducible Demo

See "Steps to Reproduce"

@Timer
Copy link
Contributor

Timer commented Jul 23, 2018

Did you run your tests as npm test -- --no-watchman? This is a known bug fixed in a future (unreleased) version of Jest.

@Timer Timer closed this as completed Jul 23, 2018
@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants