Skip to content
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 filtering not working when --collectCoverageFrom option is before filter argument #5905

Closed
manu-st opened this issue Mar 30, 2018 · 3 comments · Fixed by #5914
Closed

Comments

@manu-st
Copy link

manu-st commented Mar 30, 2018

With jest version 22.4.2, upgrading from version 21.2.1 there was a change in behavior from the command line.

We used to have the following:

node ./node_modules/jest-cli/bin/jest.js --config=./testing/jest.config.js --coverage --collectCoverageFrom="**/*.{ts,tsx}" FileToTest

To test just files matching FileToTest. And this worked just fine but not in 22.4.2 where it ignores the last argument and runs the whole test suite.

Luckily there is a workaround by making sure that --collectCoverageFrom is not the before last in the command line:

node ./node_modules/jest-cli/bin/jest.js --coverage  --collectCoverageFrom=**/*.{ts,tsx} --config=./testing/jest.config.js HashTable

This is tested on Windows 10.

@rickhanlonii
Copy link
Member

This was introduced here and we need to roll back

@rickhanlonii
Copy link
Member

PR submitted, thanks for the report @manu-st

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants