-
-
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
--findRelatedTests overrides --testPathPattern #5129
Comments
I agree it makes sense that |
Might find time for a PR at some point, but for now if anyone else wants this functionality I just changed to using the |
For those looking to help out on this one, this PR solves a similar problem and might be useful to check out: #6736 🙂 |
doesn't work either. |
Hi @SimenB is this still something that needs attention? |
@mackness I just double-checked, this bug still occurs, so yes a fix would be appreciated :) |
Hi, I would appreciate it as well. 👍 |
@jeysal @natterstefan I am having a little bit of trouble figuring out where to get started with this issue but I am still looking into it! @jeysal Do you think all of the changes will be isolated to this file: https://github.com/facebook/jest/blob/master/packages/jest-config/src/normalize.ts or do you think there are other parts of the codebase I should be considering? Thanks for help! |
@mackness Off the top of my head I think |
@jeysal Awesome I think I'm on the right track, might have a PR soon :) |
Hi @jeysal just want to make sure my change is headed in the right direction. If you think it make sense I can write a couple tests for |
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 30 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. |
Do you want to request a feature or report a bug?
Report what I believe is a bug (It doesn't seem to be expected behaviour from my research)
What is the current behavior?
I'm running
jest --testPathPattern=PATTERN --findRelatedTests
on a precommit hook withlint-staged
and it runs tests that don't match with patternIf 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
andyarn test
.Clone https://github.com/emilgoldsmith/jest-bug and you can try running
yarn run correct-behaviour
andyarn run buggy-behaviour
to see the difference.What is the expected behavior?
It should check for all related tests that they fit the
testPathPattern
, and in the case ofyarn run buggy-behaviour
it should return the exactly same asyarn run correct-behaviour
, and therefore not find any tests.Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
I'll just provide what I used in the example repo I created above:
node v9.3.0
yarn v1.3.2
default yarn configuration
OS: Ubuntu 16.04
The text was updated successfully, but these errors were encountered: