diff --git a/integration-tests/__tests__/__snapshots__/coverage_report.test.js.snap b/integration-tests/__tests__/__snapshots__/coverage_report.test.js.snap index 109d957bb519..f48f59f7134e 100644 --- a/integration-tests/__tests__/__snapshots__/coverage_report.test.js.snap +++ b/integration-tests/__tests__/__snapshots__/coverage_report.test.js.snap @@ -1,46 +1,46 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`collects coverage from duplicate files avoiding shared cache 1`] = ` -"---------------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ----------------|----------|----------|----------|----------|----------------| -All files | 100 | 100 | 100 | 100 | | - a | 100 | 100 | 100 | 100 | | - Identical.js | 100 | 100 | 100 | 100 | | - b | 100 | 100 | 100 | 100 | | - Identical.js | 100 | 100 | 100 | 100 | | ----------------|----------|----------|----------|----------|----------------| +"---------------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +---------------|----------|----------|----------|----------|-------------------| +All files | 100 | 100 | 100 | 100 | | + a | 100 | 100 | 100 | 100 | | + Identical.js | 100 | 100 | 100 | 100 | | + b | 100 | 100 | 100 | 100 | | + Identical.js | 100 | 100 | 100 | 100 | | +---------------|----------|----------|----------|----------|-------------------| " `; exports[`collects coverage only from multiple specified files 1`] = ` -"--------------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ---------------|----------|----------|----------|----------|----------------| -All files | 100 | 100 | 100 | 100 | | - OtherFile.js | 100 | 100 | 100 | 100 | | - setup.js | 100 | 100 | 100 | 100 | | ---------------|----------|----------|----------|----------|----------------| +"--------------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +--------------|----------|----------|----------|----------|-------------------| +All files | 100 | 100 | 100 | 100 | | + OtherFile.js | 100 | 100 | 100 | 100 | | + setup.js | 100 | 100 | 100 | 100 | | +--------------|----------|----------|----------|----------|-------------------| " `; exports[`collects coverage only from specified file 1`] = ` -"----------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -----------|----------|----------|----------|----------|----------------| -All files | 100 | 100 | 100 | 100 | | - setup.js | 100 | 100 | 100 | 100 | | -----------|----------|----------|----------|----------|----------------| +"----------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +----------|----------|----------|----------|----------|-------------------| +All files | 100 | 100 | 100 | 100 | | + setup.js | 100 | 100 | 100 | 100 | | +----------|----------|----------|----------|----------|-------------------| " `; exports[`collects coverage only from specified files avoiding dependencies 1`] = ` -"----------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -----------|----------|----------|----------|----------|----------------| -All files | 85.71 | 100 | 50 | 85.71 | | - Sum.js | 85.71 | 100 | 50 | 85.71 | 12 | -----------|----------|----------|----------|----------|----------------| +"----------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +----------|----------|----------|----------|----------|-------------------| +All files | 85.71 | 100 | 50 | 85.71 | | + Sum.js | 85.71 | 100 | 50 | 85.71 | 12 | +----------|----------|----------|----------|----------|-------------------| " `; @@ -54,19 +54,19 @@ Ran all test suites. `; exports[`outputs coverage report 1`] = ` -"-------------------------------------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | --------------------------------------|----------|----------|----------|----------|----------------| -All files | 56.52 | 0 | 50 | 56.52 | | - coverage-report | 41.18 | 0 | 25 | 41.18 | | - OtherFile.js | 100 | 100 | 100 | 100 | | - Sum.js | 85.71 | 100 | 50 | 85.71 | 12 | - SumDependency.js | 0 | 0 | 0 | 0 | 8,10,11,14 | - 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 | | - Identical.js | 100 | 100 | 100 | 100 | | --------------------------------------|----------|----------|----------|----------|----------------| +"-------------------------------------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +-------------------------------------|----------|----------|----------|----------|-------------------| +All files | 56.52 | 0 | 50 | 56.52 | | + coverage-report | 41.18 | 0 | 25 | 41.18 | | + OtherFile.js | 100 | 100 | 100 | 100 | | + Sum.js | 85.71 | 100 | 50 | 85.71 | 12 | + SumDependency.js | 0 | 0 | 0 | 0 | 8,10,11,14 | + 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 | | + Identical.js | 100 | 100 | 100 | 100 | | +-------------------------------------|----------|----------|----------|----------|-------------------| " `; diff --git a/integration-tests/__tests__/__snapshots__/coverage_threshold.test.js.snap b/integration-tests/__tests__/__snapshots__/coverage_threshold.test.js.snap index 62d13915a7de..a66d1328111a 100644 --- a/integration-tests/__tests__/__snapshots__/coverage_threshold.test.js.snap +++ b/integration-tests/__tests__/__snapshots__/coverage_threshold.test.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`exits with 1 if coverage threshold is not met 1`] = ` -"----------------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -----------------|----------|----------|----------|----------|----------------| -All files | 50 | 100 | 0 | 50 | | - not-covered.js | 50 | 100 | 0 | 50 | 3 | -----------------|----------|----------|----------|----------|----------------| +"----------------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +----------------|----------|----------|----------|----------|-------------------| +All files | 50 | 100 | 0 | 50 | | + not-covered.js | 50 | 100 | 0 | 50 | 3 | +----------------|----------|----------|----------|----------|-------------------| " `; diff --git a/integration-tests/__tests__/__snapshots__/transform.test.js.snap b/integration-tests/__tests__/__snapshots__/transform.test.js.snap index dac9f1bc9999..57f504e5b334 100644 --- a/integration-tests/__tests__/__snapshots__/transform.test.js.snap +++ b/integration-tests/__tests__/__snapshots__/transform.test.js.snap @@ -1,30 +1,30 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`babel-jest instruments only specific files and collects coverage 1`] = ` -"------------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -------------|----------|----------|----------|----------|----------------| -All files | 83.33 | 100 | 50 | 83.33 | | - Covered.js | 83.33 | 100 | 50 | 83.33 | 15 | -------------|----------|----------|----------|----------|----------------| +"------------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +------------|----------|----------|----------|----------|-------------------| +All files | 83.33 | 100 | 50 | 83.33 | | + Covered.js | 83.33 | 100 | 50 | 83.33 | 15 | +------------|----------|----------|----------|----------|-------------------| " `; exports[`custom transformer instruments files 1`] = ` -"----------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -----------|----------|----------|----------|----------|----------------| -All files | Unknown | Unknown | Unknown | Unknown | | -----------|----------|----------|----------|----------|----------------| +"----------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +----------|----------|----------|----------|----------|-------------------| +All files | Unknown | Unknown | Unknown | Unknown | | +----------|----------|----------|----------|----------|-------------------| " `; exports[`no babel-jest instrumentation with no babel-jest 1`] = ` -"------------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -------------|----------|----------|----------|----------|----------------| -All files | 83.33 | 100 | 50 | 83.33 | | - Covered.js | 83.33 | 100 | 50 | 83.33 | 15 | -------------|----------|----------|----------|----------|----------------| +"------------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +------------|----------|----------|----------|----------|-------------------| +All files | 83.33 | 100 | 50 | 83.33 | | + Covered.js | 83.33 | 100 | 50 | 83.33 | 15 | +------------|----------|----------|----------|----------|-------------------| " `; diff --git a/integration-tests/__tests__/__snapshots__/typescript_coverage.test.js.snap b/integration-tests/__tests__/__snapshots__/typescript_coverage.test.js.snap index a81fd746e81e..d3e2624734aa 100644 --- a/integration-tests/__tests__/__snapshots__/typescript_coverage.test.js.snap +++ b/integration-tests/__tests__/__snapshots__/typescript_coverage.test.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`instruments and collects coverage for typescript files 1`] = ` -"------------|----------|----------|----------|----------|----------------| -File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -------------|----------|----------|----------|----------|----------------| -All files | 100 | 100 | 100 | 100 | | - covered.ts | 100 | 100 | 100 | 100 | | -------------|----------|----------|----------|----------|----------------| +"------------|----------|----------|----------|----------|-------------------| +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | +------------|----------|----------|----------|----------|-------------------| +All files | 100 | 100 | 100 | 100 | | + covered.ts | 100 | 100 | 100 | 100 | | +------------|----------|----------|----------|----------|-------------------| " `; diff --git a/yarn.lock b/yarn.lock index 97a2aa4ca845..4fb55bb21993 100644 --- a/yarn.lock +++ b/yarn.lock @@ -196,8 +196,8 @@ are-we-there-yet@~1.1.2: readable-stream "^2.0.6" argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" dependencies: sprintf-js "~1.0.2" @@ -442,7 +442,20 @@ babel-eslint@^7.2.3: babel-types "^6.23.0" babylon "^6.17.0" -babel-generator@^6.18.0, babel-generator@^6.24.1, babel-generator@^6.26.0: +babel-generator@^6.18.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-generator@^6.24.1, babel-generator@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" dependencies: @@ -1277,8 +1290,8 @@ bplist-parser@0.1.1: big-integer "^1.6.7" brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" dependencies: balanced-match "^1.0.0" concat-map "0.0.1" @@ -4093,8 +4106,8 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" invariant@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + version "2.2.3" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.3.tgz#1a827dfde7dcbd7c323f0ca826be8fa7c5e9d688" dependencies: loose-envify "^1.0.0" @@ -4401,7 +4414,23 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.1.0, istanbul-api@^1.1.14: +istanbul-api@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.2.tgz#e17cd519dd5ec4141197f246fdf380b75487f3b1" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.2" + istanbul-lib-hook "^1.1.0" + istanbul-lib-instrument "^1.9.2" + istanbul-lib-report "^1.1.3" + istanbul-lib-source-maps "^1.2.3" + istanbul-reports "^1.1.4" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-api@^1.1.14: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.1.tgz#0c60a0515eb11c7d65c6b50bba2c6e999acd8620" dependencies: @@ -4417,17 +4446,21 @@ istanbul-api@^1.1.0, istanbul-api@^1.1.14: mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.1.1: +istanbul-lib-coverage@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" +istanbul-lib-coverage@^1.1.1, istanbul-lib-coverage@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" + istanbul-lib-hook@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.1: +istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0: version "1.9.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" dependencies: @@ -4439,16 +4472,28 @@ istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-ins istanbul-lib-coverage "^1.1.1" semver "^5.3.0" -istanbul-lib-report@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz#922be27c13b9511b979bd1587359f69798c1d425" +istanbul-lib-instrument@^1.9.1, istanbul-lib-instrument@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" dependencies: - istanbul-lib-coverage "^1.1.1" + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.1.2" + semver "^5.3.0" + +istanbul-lib-report@^1.1.2, istanbul-lib-report@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259" + dependencies: + istanbul-lib-coverage "^1.1.2" mkdirp "^0.5.1" path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.2: +istanbul-lib-source-maps@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#750578602435f28a0c04ee6d7d9e0f2960e62c1c" dependencies: @@ -4458,9 +4503,19 @@ istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.2: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.3.tgz#3b9e1e8defb6d18b1d425da8e8b32c5a163f2d10" +istanbul-lib-source-maps@^1.2.2, istanbul-lib-source-maps@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.1.2" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.3, istanbul-reports@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.4.tgz#5ccba5e22b7b5a5d91d5e0a830f89be334bf97bd" dependencies: handlebars "^4.0.3" @@ -5081,10 +5136,14 @@ lodash@^3.10.1, lodash@^3.5.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.6, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.1: +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.16.6, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +lodash@^4.14.0, lodash@^4.17.4: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + log4js@^2.3.9: version "2.4.1" resolved "https://registry.yarnpkg.com/log4js/-/log4js-2.4.1.tgz#b0c4e88133e0e3056afdc6f91f7f377576158778" @@ -7028,10 +7087,14 @@ sax@~1.1.1: version "1.1.6" resolved "https://registry.yarnpkg.com/sax/-/sax-1.1.6.tgz#5d616be8a5e607d54e114afae55b7eaf2fcc3240" -"semver@2 || 3 || 4 || 5", semver@5.x, semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1: +"semver@2 || 3 || 4 || 5", semver@5.x, semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" +semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + semver@~2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/semver/-/semver-2.3.2.tgz#b9848f25d6cf36333073ec9ef8856d42f1233e52" @@ -7333,7 +7396,7 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3, source-map@~0.5.6: +source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3, source-map@~0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"