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

Fix coverage test for Babel 7 #7202

Merged
merged 3 commits into from
Dec 25, 2018
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
10 changes: 5 additions & 5 deletions e2e/__tests__/__snapshots__/coverage_remapping.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Object {
"0": Object {
"decl": Object {
"end": Object {
"column": 28,
"column": 29,
"line": 3,
},
"start": Object {
Expand All @@ -206,7 +206,7 @@ Object {
"1": Object {
"decl": Object {
"end": Object {
"column": 35,
"column": 36,
"line": 7,
},
"start": Object {
Expand All @@ -229,7 +229,7 @@ Object {
"2": Object {
"decl": Object {
"end": Object {
"column": 48,
"column": 49,
"line": 7,
},
"start": Object {
Expand Down Expand Up @@ -314,7 +314,7 @@ Object {
},
"5": Object {
"end": Object {
"column": 40,
"column": 43,
"line": 7,
},
"start": Object {
Expand All @@ -324,7 +324,7 @@ Object {
},
"6": Object {
"end": Object {
"column": 53,
"column": 54,
"line": 7,
},
"start": Object {
Expand Down
32 changes: 16 additions & 16 deletions e2e/__tests__/__snapshots__/coverage_report.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ exports[`generates coverage when using the testRegex config param 1`] = `
"-------------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-------------------------------------|----------|----------|----------|----------|-------------------|
All files | 59.09 | 0 | 50 | 58.82 | |
coverage-report | 43.75 | 0 | 25 | 46.15 | |
All files | 56.52 | 0 | 50 | 55.56 | |
SimenB marked this conversation as resolved.
Show resolved Hide resolved
coverage-report | 41.18 | 0 | 25 | 42.86 | |
OtherFile.js | 100 | 100 | 100 | 100 | |
Sum.js | 85.71 | 100 | 50 | 100 | |
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 15,16,17,19 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
Identical.js | 100 | 100 | 100 | 100 | |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
Expand All @@ -72,12 +72,12 @@ exports[`outputs coverage report 1`] = `
"-------------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-------------------------------------|----------|----------|----------|----------|-------------------|
All files | 59.09 | 0 | 50 | 58.82 | |
coverage-report | 43.75 | 0 | 25 | 46.15 | |
All files | 56.52 | 0 | 50 | 55.56 | |
coverage-report | 41.18 | 0 | 25 | 42.86 | |
OtherFile.js | 100 | 100 | 100 | 100 | |
Sum.js | 85.71 | 100 | 50 | 100 | |
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 15,16,17,19 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
Identical.js | 100 | 100 | 100 | 100 | |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
Expand All @@ -88,20 +88,20 @@ All files | 59.09 | 0 | 50 | 58.82
exports[`outputs coverage report when text and text-summary is requested 1`] = `
"
=============================== Coverage summary ===============================
Statements : 59.09% ( 13/22 )
Statements : 56.52% ( 13/23 )
Branches : 0% ( 0/4 )
Functions : 50% ( 3/6 )
Lines : 58.82% ( 10/17 )
Lines : 55.56% ( 10/18 )
================================================================================
-------------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-------------------------------------|----------|----------|----------|----------|-------------------|
All files | 59.09 | 0 | 50 | 58.82 | |
coverage-report | 43.75 | 0 | 25 | 46.15 | |
All files | 56.52 | 0 | 50 | 55.56 | |
coverage-report | 41.18 | 0 | 25 | 42.86 | |
OtherFile.js | 100 | 100 | 100 | 100 | |
Sum.js | 85.71 | 100 | 50 | 100 | |
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 15,16,17,19 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
Identical.js | 100 | 100 | 100 | 100 | |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
Expand All @@ -113,12 +113,12 @@ exports[`outputs coverage report when text is requested 1`] = `
"-------------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-------------------------------------|----------|----------|----------|----------|-------------------|
All files | 59.09 | 0 | 50 | 58.82 | |
coverage-report | 43.75 | 0 | 25 | 46.15 | |
All files | 56.52 | 0 | 50 | 55.56 | |
coverage-report | 41.18 | 0 | 25 | 42.86 | |
OtherFile.js | 100 | 100 | 100 | 100 | |
Sum.js | 85.71 | 100 | 50 | 100 | |
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,12 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 15,16,17,19 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
Identical.js | 100 | 100 | 100 | 100 | |
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
Expand All @@ -129,9 +129,9 @@ All files | 59.09 | 0 | 50 | 58.82
exports[`outputs coverage report when text-summary is requested 1`] = `
"
=============================== Coverage summary ===============================
Statements : 59.09% ( 13/22 )
Statements : 56.52% ( 13/23 )
Branches : 0% ( 0/4 )
Functions : 50% ( 3/6 )
Lines : 58.82% ( 10/17 )
Lines : 55.56% ( 10/18 )
================================================================================"
`;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"glob": "^7.1.1",
"graceful-fs": "^4.1.11",
"isbinaryfile": "^3.0.3",
"istanbul-api": "^2.0.6",
"istanbul-lib-coverage": "^2.0.1",
"istanbul-api": "^2.0.8",
"istanbul-lib-coverage": "^2.0.2",
"jasmine-reporters": "^2.2.0",
"jest-junit": "^5.1.0",
"jest-silent-reporter": "^0.1.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"graceful-fs": "^4.1.11",
"import-local": "^2.0.0",
"is-ci": "^1.0.10",
"istanbul-api": "^2.0.6",
"istanbul-lib-coverage": "^2.0.1",
"istanbul-lib-instrument": "^3.0.0",
"istanbul-lib-source-maps": "^2.0.1",
"istanbul-api": "^2.0.8",
"istanbul-lib-coverage": "^2.0.2",
"istanbul-lib-instrument": "^3.0.1",
"istanbul-lib-source-maps": "^3.0.1",
"jest-changed-files": "^23.4.2",
"jest-config": "^23.6.0",
"jest-environment-jsdom": "^23.4.0",
Expand Down
74 changes: 37 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7562,73 +7562,73 @@ isstream@~0.1.2:
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=

istanbul-api@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-2.0.6.tgz#cd7b33ee678f6c01531d05f5e567ebbcd25f8ecc"
integrity sha512-8W5oeAGWXhtTJjAyVfvavOLVyZCTNCKsyF6GON/INKlBdO7uJ/bv3qnPj5M6ERKzmMCJS1kntnjjGuJ86fn3rQ==
istanbul-api@^2.0.8:
version "2.0.8"
resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-2.0.8.tgz#5621503c5595e5adbbacd5ce257090417c7f55da"
integrity sha512-ITCccemErW+BhZotmyQ/ktlYTAp9r7oWfz1oxxMpgKQVTUw0NAYRbKLbOSNaInipecIKul7U7O5BfCQBBRZa3w==
dependencies:
async "^2.6.1"
compare-versions "^3.2.1"
fileset "^2.0.3"
istanbul-lib-coverage "^2.0.1"
istanbul-lib-hook "^2.0.1"
istanbul-lib-instrument "^3.0.0"
istanbul-lib-report "^2.0.2"
istanbul-lib-source-maps "^2.0.1"
istanbul-reports "^2.0.1"
istanbul-lib-coverage "^2.0.2"
istanbul-lib-hook "^2.0.2"
istanbul-lib-instrument "^3.0.1"
istanbul-lib-report "^2.0.3"
istanbul-lib-source-maps "^3.0.1"
istanbul-reports "^2.0.3"
js-yaml "^3.12.0"
make-dir "^1.3.0"
once "^1.4.0"

istanbul-lib-coverage@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#2aee0e073ad8c5f6a0b00e0dfbf52b4667472eda"
integrity sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==
istanbul-lib-coverage@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.2.tgz#d5db9a7a4bb8fdbd62ec746226385987b73a8f43"
integrity sha512-4CsY730KHy12ya/YNKubrMlb7EZZVsEPhXntyRY/Cbs7HN5HdznLbI4UbvIGHgocxHx3VkGe7l6IN1lipetuGg==

istanbul-lib-hook@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.1.tgz#918a57b75a0f951d552a08487ca1fa5336433d72"
integrity sha512-ufiZoiJ8CxY577JJWEeFuxXZoMqiKpq/RqZtOAYuQLvlkbJWscq9n3gc4xrCGH9n4pW0qnTxOz1oyMmVtk8E1w==
istanbul-lib-hook@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.2.tgz#9ddd28aeac10f3bb6a4d02325e72b35044d17d3a"
integrity sha512-m0MwviQ0Av6qBNDkvKdLBxxuK6ffXo8761gE2bfT+/b+dhg8LUyQhp1nFh795LO12DpiSocuCPIRwILCsN1//Q==
dependencies:
append-transform "^1.0.0"

istanbul-lib-instrument@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz#b5f066b2a161f75788be17a9d556f40a0cf2afc9"
integrity sha512-eQY9vN9elYjdgN9Iv6NS/00bptm02EBBk70lRMaVjeA6QYocQgenVrSgC28TJurdnZa80AGO3ASdFN+w/njGiQ==
istanbul-lib-instrument@^3.0.0, istanbul-lib-instrument@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.1.tgz#dd631e117dd9891e8bf1de7bb400cb8e491363af"
integrity sha512-/LTPhh1YKXjJlb5uggsiZjJHuViIljcIsB1zqmZegIw2yQ4l8LRksRGebJrZUFVEE28ZtKzmmT50W5tpAucfJg==
dependencies:
"@babel/generator" "^7.0.0"
"@babel/parser" "^7.0.0"
"@babel/template" "^7.0.0"
"@babel/traverse" "^7.0.0"
"@babel/types" "^7.0.0"
istanbul-lib-coverage "^2.0.1"
istanbul-lib-coverage "^2.0.2"
semver "^5.5.0"

istanbul-lib-report@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz#430a2598519113e1da7af274ba861bd42dd97535"
integrity sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==
istanbul-lib-report@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.3.tgz#8e22534766e9cc8e20ae96283331b4405da9dce9"
integrity sha512-25gX27Mbd3MjM41hwGl5lWcQEqaPaMP79YDFS20xuTUujItNmHgTBS3WRZvzyzLE0IAKaL+JpLrryou2WlZNMw==
dependencies:
istanbul-lib-coverage "^2.0.1"
istanbul-lib-coverage "^2.0.2"
make-dir "^1.3.0"
supports-color "^5.4.0"

istanbul-lib-source-maps@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-2.0.1.tgz#ce8b45131d8293fdeaa732f4faf1852d13d0a97e"
integrity sha512-30l40ySg+gvBLcxTrLzR4Z2XTRj3HgRCA/p2rnbs/3OiTaoj054gAbuP5DcLOtwqmy4XW8qXBHzrmP2/bQ9i3A==
istanbul-lib-source-maps@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.1.tgz#002936e1106c4fa49714a946e6c63c1098b52e11"
integrity sha512-DBsZMpCwCPewRCmyd0FETHtzarQK/kKejQkDPBqKPwLYQmhs2p6a7yytfVDqib7PgXGSJZNTc1b6B3jl9G8FqA==
dependencies:
debug "^3.1.0"
istanbul-lib-coverage "^2.0.1"
istanbul-lib-coverage "^2.0.2"
make-dir "^1.3.0"
rimraf "^2.6.2"
source-map "^0.6.1"

istanbul-reports@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.0.1.tgz#fb8d6ea850701a3984350b977a969e9a556116a7"
integrity sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==
istanbul-reports@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.0.3.tgz#332eda684c9ee891f199dfba305c3e776f55fc16"
integrity sha512-qpQ5ZWBkOatTxmTelS+HV5ybPSq7EeXmwXrPbGv7ebP+9DJOtveUcv6hCncZE4IxSAEkdmLEh3xo31SCttbApQ==
dependencies:
handlebars "^4.0.11"

Expand Down