From 8ae92dca3418d97f6174683c244d55a6e85879a8 Mon Sep 17 00:00:00 2001 From: HANATANI Takuma Date: Wed, 28 Mar 2018 14:11:30 +0900 Subject: [PATCH 1/3] Replace from mapCoverage to collectCoverage. --- docs/en/guides/testing-SFCs-with-jest.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/guides/testing-SFCs-with-jest.md b/docs/en/guides/testing-SFCs-with-jest.md index 409dfb3cf..ea6e89e79 100644 --- a/docs/en/guides/testing-SFCs-with-jest.md +++ b/docs/en/guides/testing-SFCs-with-jest.md @@ -49,7 +49,7 @@ Next, create a `jest` block in `package.json`: // process `*.vue` files with `vue-jest` ".*\\.(vue)$": "/node_modules/vue-jest" }, - "mapCoverage": true + "collectCoverage": true } } ``` @@ -159,7 +159,7 @@ Jest recommends creating a `__tests__` directory right next to the code being te Jest can be used to generate coverage reports in multiple formats. The following is a simple example to get started with: -Extend your `jest` config (usually in `package.json` or `jest.config.js`) with the [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoverage-boolean) option, and then add the [`collectCoverageFrom`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoveragefrom-array) array to define the files for which coverage information should be collected. You'll also want [`mapCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#mapcoverage-boolean) to be `true`, for coverage data to be accurate. +Extend your `jest` config (usually in `package.json` or `jest.config.js`) with the [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoverage-boolean) option, and then add the [`collectCoverageFrom`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoveragefrom-array) array to define the files for which coverage information should be collected. You'll also want [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#mapcoverage-boolean) to be `true`, for coverage data to be accurate. ```json { @@ -170,7 +170,7 @@ Extend your `jest` config (usually in `package.json` or `jest.config.js`) with t "**/*.{js,vue}", "!**/node_modules/**" ], - "mapCoverage": true + "collectCoverage": true } } ``` From 045281c58e78dbf49e6b11700cce0a6ce081d403 Mon Sep 17 00:00:00 2001 From: HANATANI Takuma Date: Wed, 28 Mar 2018 14:18:47 +0900 Subject: [PATCH 2/3] remove mapCoverage option description --- docs/en/guides/testing-SFCs-with-jest.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/en/guides/testing-SFCs-with-jest.md b/docs/en/guides/testing-SFCs-with-jest.md index ea6e89e79..874f38b34 100644 --- a/docs/en/guides/testing-SFCs-with-jest.md +++ b/docs/en/guides/testing-SFCs-with-jest.md @@ -159,7 +159,7 @@ Jest recommends creating a `__tests__` directory right next to the code being te Jest can be used to generate coverage reports in multiple formats. The following is a simple example to get started with: -Extend your `jest` config (usually in `package.json` or `jest.config.js`) with the [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoverage-boolean) option, and then add the [`collectCoverageFrom`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoveragefrom-array) array to define the files for which coverage information should be collected. You'll also want [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#mapcoverage-boolean) to be `true`, for coverage data to be accurate. +Extend your `jest` config (usually in `package.json` or `jest.config.js`) with the [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoverage-boolean) option, and then add the [`collectCoverageFrom`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoveragefrom-array) array to define the files for which coverage information should be collected. ```json { @@ -169,8 +169,7 @@ Extend your `jest` config (usually in `package.json` or `jest.config.js`) with t "collectCoverageFrom": [ "**/*.{js,vue}", "!**/node_modules/**" - ], - "collectCoverage": true + ] } } ``` From 7c5fc971069234a6210982435af958a7e59cee5e Mon Sep 17 00:00:00 2001 From: HANATANI Takuma Date: Wed, 28 Mar 2018 23:03:21 +0900 Subject: [PATCH 3/3] remove 'collectCoverage' in simple example --- docs/en/guides/testing-SFCs-with-jest.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/guides/testing-SFCs-with-jest.md b/docs/en/guides/testing-SFCs-with-jest.md index 874f38b34..f6a1d42ce 100644 --- a/docs/en/guides/testing-SFCs-with-jest.md +++ b/docs/en/guides/testing-SFCs-with-jest.md @@ -48,8 +48,7 @@ Next, create a `jest` block in `package.json`: "transform": { // process `*.vue` files with `vue-jest` ".*\\.(vue)$": "/node_modules/vue-jest" - }, - "collectCoverage": true + } } } ```