question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm test does not detect new test file changes

See original GitHub issue

Hi

I created a new app using create-react-app. When npm test is run i get following message

I am using node v4.6.1 and npm 2.15.9

No tests found related to files changed since last commit. Press a to run all tests, or run Jest with --watchAll.

Watch Usage › Press a to run all tests. › Press p to filter by a filename regex pattern. › Press q to quit watch mode. › Press Enter to trigger a test run.

Even if the App.test.js file is changed that doesnt trigger the npm test.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
NaveenDKcommented, Oct 19, 2017

Hi I am having the same issue : I get the “No tests found related to files changed since last commit.” error-I see the test passing locally, but when I run the same job with jenkins it says : no tests found" I have compared the workspace of jenkins , src code and the git repo … all have the same code… thanks for any help– And I added a after npm test in the build actions but it did not work I also tried jest --watchAll still it did not work Naveen 👍

3reactions
fah7eemcommented, Feb 16, 2017

If you are running the test from an IDE or have the command stored somewhere. Add a after the command: npm test a

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm test does not detect new test file changes in jenkins
I have created a react APP using create-react-app and I use JEST for testing and I did some new changes in a file...
Read more >
Run jest for unit tests of modified files only | by SunCommander
In this article, you will learn how to run Jest for modified files only in a Pull Request. This can be done using...
Read more >
How To Test a React App with Jest and React Testing Library
After running npm test for the first time, you will see this output in the terminal: Output. No tests found related to files...
Read more >
npm-test - npm Docs
npm -test. Test a package. Select CLI Version: Version 7.24.2 (Legacy Release) ... If true, npm does not run scripts specified in package.json...
Read more >
Jest testing without the noise - DEV Community ‍ ‍
npm test -- FILE_NAME. Using the command above, we will only be running the test suites inside that file! Not only that, but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found