Ability to add folders to have jest ignore
See original GitHub issueWe currently have a couple of submodules that are outside of the src directory that we would like jest to ignore. The only way we’ve found to do this currently is to replace the test script with one of our own. While this isn’t a big deal, it would be nice to be able to ignore these directories within our package.json
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
How can I exclude files from Jest watch? - Stack Overflow
To exclude an entire folder, add the following in the "jest" property of the package.json file:
Read more >Configuring Jest
Use the <rootDir> string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your...
Read more >Which jest config option do I use to ignore a particular folder
i have a dist folder i want to ignore jest config options not figuring it out.
Read more >How to run, ignore or skip Jest tests, suites and files
Run a single Jest test file with the CLI. See Running the examples to get set up, then run: With the CLI, you...
Read more >Setup - Testing Library
To make your custom test file accessible in your Jest test files without using relative imports ( ../../test-utils ), add the folder containing ......
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
Right, but why do you need to put
normalised-test-data.js
into__tests__
? You can put it outside of the folder.Hi i’m having a similar issue, I have fakers inside the
__tests__
folder, I believe they belong there. It would be awesome to have a way to ignore a folder or files.Right now I’m planning on solving this by moving them outside the
__tests__
folder.An easy approach could be ignoring files with a particular key. Like
file.test.js
but the opposite. Maybe something likemyFile.ignore.test.js
, or someone with more creativity can think of a better one.Thanks a lot!