Skip to content

Commit

Permalink
Switch collectCoverageFrom back to a string (#5914)
Browse files Browse the repository at this point in the history
* Switch collectCoverageFrom back to a string

* Update CHANGELOG
  • Loading branch information
rickhanlonii authored and cpojer committed Apr 9, 2018
1 parent 5a21be3 commit 5ba1684
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
([#5720](https://github.com/facebook/jest/pull/5720))
* `[pretty-format]` Handle React fragments better
([#5816](https://github.com/facebook/jest/pull/5816))
* `[jest-cli]` Switch collectCoverageFrom back to a string
([#5914](https://github.com/facebook/jest/pull/5914))
* `[jest-regex-util]` Fix handling regex symbols in tests path on Windows
([#5941](https://github.com/facebook/jest/pull/5941))

Expand All @@ -83,7 +85,7 @@
* `[jest-jasmine2]` Simplify `Env.execute` and TreeProcessor to setup and clean
resources for the top suite the same way as for all of the children suites
([#5885](https://github.com/facebook/jest/pull/5885))
* `*` Run Prettier on compiled output
* `[*]` Run Prettier on compiled output
([#5858](https://github.com/facebook/jest/pull/3497))
* `[jest-cli]` Add fileChange hook for plugins
([#5708](https://github.com/facebook/jest/pull/5708))
Expand Down
4 changes: 2 additions & 2 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ directory. The default cache directory can be found by calling

### `--collectCoverageFrom=<glob>`

An array of glob patterns relative to <rootDir> matching the files that coverage
info needs to be collected from.
A glob pattern relative to <rootDir> matching the files that coverage info needs
to be collected from.

### `--colors`

Expand Down
3 changes: 2 additions & 1 deletion integration-tests/__tests__/coverage_report.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ test('collects coverage only from multiple specified files', () => {
const {stdout} = runJest(DIR, [
'--no-cache',
'--coverage',
'--collectCoverageFrom', // overwrites the one in package.json
'--collectCoverageFrom',
'setup.js',
'--collectCoverageFrom',
'OtherFile.js',
]);

Expand Down
6 changes: 3 additions & 3 deletions packages/jest-cli/src/cli/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ export const options = {
},
collectCoverageFrom: {
description:
'An array of glob patterns relative to <rootDir> matching the files ' +
'that coverage info needs to be collected from.',
type: 'array',
'A glob pattern relative to <rootDir> matching the files that coverage ' +
'info needs to be collected from.',
type: 'string',
},
collectCoverageOnlyFrom: {
description: 'Explicit list of paths coverage will be restricted to.',
Expand Down

0 comments on commit 5ba1684

Please sign in to comment.