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

Specifying multiple collectCoverageFrom paths #5198

Closed
satazor opened this issue Dec 30, 2017 · 3 comments
Closed

Specifying multiple collectCoverageFrom paths #5198

satazor opened this issue Dec 30, 2017 · 3 comments

Comments

@satazor
Copy link

satazor commented Dec 30, 2017

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Calling:

jest --collectCoverageFrom foo/**/*.js bar/**/*.js

Does not assume both patterns as collectCoverageFrom. Though, this works:

jest --collectCoverageFrom foo/**/*.js --collectCoverageFrom bar/**/*.js
jest --collectCoverageFrom '["foo/**/*.js", "bar/**/*.js"]'

If 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 and yarn test.

See above.

What is the expected behavior?

The expected behavior is that the first form should work. The current behavior is inconsistent with collectCoverageOnlyFrom and many other options. This is due to the collectCoverageFrom type being a string instead of an array, see https://github.com/facebook/jest/blob/8549900b8e98d5cf6c9983cdd34d4a089c9f2bed/packages/jest-cli/src/cli/args.js#L143.

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

The jest configuration does not apply here.

Jest 22.0.0
Node: 8.9.3
npm: 5.6.0
OS: Mac

@thymikee
Copy link
Collaborator

thymikee commented Jan 2, 2018

I'm not opposed to convert it to an array type. Can you send a PR with the test? 🙂

@SimenB
Copy link
Member

SimenB commented Feb 12, 2018

#5537

@SimenB SimenB closed this as completed Feb 12, 2018
@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 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants