-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
find tests when path includes folder starting with a period #7267
Comments
The test I said was failing for me in #3111 was actually fixed by me restarting watchman locally... |
You can restart watchman by doing |
I can confirm that killing watchman seems to fix this. Is it a bug in watchman? |
I've created https://github.com/JohnAlbin/jest-bug-7267 with the example repo. I tried |
What happens if you do |
But FYI, Jest's cache was giving me inconsistent results; if I installed Jest v22, ran the tests, and then re-installed v23, the tests would all be found until I used the |
I'm not sure if this is related, but I'm experiencing an issue when running jest via yarn. Given: "scripts": {
"jest": "jest .storybook"
} Then
Update: this is probably just user error on my end, a co-worker is running my code and not having any issues. |
This bug made me question my sanity at first too.
FYI, because of the Jest cache issues, that's exactly what was happening to my team. My co-worker saw the bug and I didn't. Then finally I did see the bug, but after a day it disappeared. Then reappeared. However, we always used Yarn (not npm). AND, the tests that were being skipped were ones that we put in our |
Hello, me and two other students are trying to fix this issue for a course in college. However, it's our first time working with jest (and any open source project really) so we are not so sure how to work this. We've done an UML components diagram for the whole system but still don't understand the flow of the program and are having a hard time finding the files directly and indirectly involved in this issue. Another problem we are having is in replicating and possibly testing our solution. If you could please give us some guidelines we would be very grateful! |
@joanasmramos thats so cool! I'd love to see the UML diagram at some point :D This video may be helpful for you for understanding how the jest architecture works That being said, this may not be a good first issue to work on because it sounds like the issue may not be in Jest but in a tool we use called Watchman. You can search our issues with the Good First Issue label to find issues good for people intro'ing to the code base 👌 |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
This is a regression of the bug reported in #3111 that was fixed in #3006 and broke again sometime in the v23 branch.
When a test is inside a folder that has a name starting with period,
.
, they are ignored bytestMatch
and bytestRegex
. It's even more obscure if the entire project is checked out below a dot-folder, in which case all tests are ignored.To Reproduce
Given the following directory listing:
Using the following
package.json
:None of the tests in a folder staring with
.
are found:Using the following
package.json
:None of the tests in a folder staring with
.
are found:Expected behavior
Using the following
package.json
:Using the following
package.json
:Link to repl or repo (highly encouraged)
Note that repl.it currently uses Jest v22 and I can't figure out how to make it run under v23.
But here's the demo link where the bug is NOT present because v22 is not broken. https://repl.it/@John_AlbinAlbin/CarpalSoulfulDirectories
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: