-
-
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
Fixes bug #13222 #13319
Fixes bug #13222 #13319
Conversation
Good to see a PR to fix this issue. Keep I mind that merging it as suggested would introduce a breaking change for the current users. This can only happen with the next major release, which is months away. It is a good idea to simply the API, but this will take time. I would say, at the moment a better idea would be to edit the documentation so that it would reflect the actual behaviour. |
@mrazauskas yeah, I believe this PR should go in the next major (I can create another one for adjusting the docs). |
Thanks for the PR! However, I think it makes more sense to align the docs with the implementation than the other way around, like you discuss.
Yep, I'll add it to a milestone 🙂 |
Thanks for adding it to the milestone @SimenB :) |
This comment was marked as outdated.
This comment was marked as outdated.
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've resolved the conflicts 🙂
can you update the docs to be reference being a string again, and add a changelog entry?
Done @SimenB. If any other change is needed, just let me know. 😃 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This PR is supposed to fix bug #13222 (--filter option not working as per documentation suggests)
Currently, the
--filter
option expected an object with shape{ filtered: { test: Array<string> } }
, even though the documentation suggests it expects{ filtered: Array<string> }
, so this commit fixes this inconsistency by making the code behave as the documentation suggests.Please note this may be a breaking change for users using this feature as the expected output object shape changed.
Test plan
Create a
filter.js
file, which exports a function as per the --filter documentation, then use it withjest --filter=filter.js
and see if jest properly filtered the test files as it should.Also, a unit test has been added to
packages/jest-core/src/__tests__/SearchSource.test.ts
.