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. |
SimenB
left a comment
There was a problem hiding this comment.
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
--filteroption 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.jsfile, which exports a function as per the --filter documentation, then use it withjest --filter=filter.jsand 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.