Jest runs tests under .git by default
See original GitHub issueDo you want to request a feature or report a bug?
bug
What is the current behavior?
Jest runs tests on branches in git when the branch name ends with “.spec.js” or “.test.js” (e.g. “.git/refs/remotes/origin/example.spec.js”).
If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install
and yarn test
.
What is the expected behavior?
Jest ignores/excludes files under “.git” by default (or perhaps even under any directory that begins with a dot).
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Jest CLI Options
Run all tests (default):. jest. Run only the tests that were specified with a pattern or filename: jest my-test #or jest path/to/my-test.js.
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 >Jest testing: Top features and how to use them - LogRocket Blog
Jest integrates with Git and Mercurial. By default, the watch mode will run only the tests affected by the changes made since the...
Read more >Jest CLI Options - Robin Pokorny
Run all tests (default): jest. Run only the tests that were specified with a ... Run tests related to changed files based on...
Read more >How do I run a single test using Jest? - Stack Overflow
If you are using Visual Studio Code you can take advantage of it and run the currently selected test (in the code editor)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Honestly that never happened to me. Do you have a repro?
Same here!
After a looooong research at work i fixed it removing upstream (
git remote rm upstream
) 🎉. Really weird, but it checks thatjest
was running under.git
.