Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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