-
-
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
Jest cant find any test with 23.2.0 #6546
Comments
Same problem on Windows, CI passing :( |
Same problem here (also on Windows, npm 6.1.0, node 8.11.3), with the following match:
Update: Ignore the strikethrough part below: I confused
|
After digging a bit I think this issue is related to #6400 which updated the dependency micromatch to the latest version. I don't know why though… (I was able to get our tests to run with jest 23.2.0 by removing testMatch completely, which presumably falls back to some default which works). |
I suck at regexes :( |
@erikrenberg ye its probably due to micromatch. See this comment -> babel/babel#8184 (comment) |
@SimenB could you please revert the upgrade that brought in micromatch? This is a very breaking change. |
I think that makes sense. Wanna send a PR reverting back to micromatch 2? We also need to add an integration test, as none of our tests caught this. None on the team uses Windows, so we rely on Appveyor CI to tell us that changes are safe for Windows as well |
I won't be able to until the 5th or 6th, if it hasn't been sent by then will do! Edit: #6650 sent by someone else :) |
Just a theory, but I think the reason why |
A PR to revert to the older version was also suggested in #6563 (comment) |
I still think we should revert, event though we work around some of the changes by replacing separators |
## Summary As part of #6400, `micromatch` was updated. While `micromatch`'s CHANGELOG claims that this is safe, several regressions have been noted in cases where users relied upon invalid glob patterns. For example, these patterns would all match `src/foo/bar/baz.js`, but no longer do: - `src/**/*.{js}` - `src/**.js` - `src/**/*.{js|ts}` Fixes #6563 Fixes #6546 ## Test plan Unit tests were added which demonstrate the known cases.
Did this fix actually work for anybody? I've spent hours trying to get this to work... I went so far as to drop my only testMatch glob to "**/**.test.ts", which is very obviously a match for "__tests__/index.test.ts". But still that message, "No tests found". |
Yes, which is why nobody else responded when this was fixed. Try asking your question on StackOverflow or reporting a new bug :) |
I am not sure why such a simple recursively check for test would be this complicated ? Other test platform don't have this problem. |
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
Jest cant find any test with 23.2.0 . If revert back to 23.1.0 - it find all test
To Reproduce
I have following testMatch in jest.config
Example of test file location tests\unit\components\loginForm.spec.js
Expected behavior
tests found and executed like in 23.1.0
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: