winterbe / jest-teamcity-reporter

Teamcity Reporter for Jest Unittest Results
https://www.npmjs.com/package/jest-teamcity-reporter
Other
50 stars 23 forks source link

Fix Cannot read property 'getCoverageSummary' of undefined #20

Closed sashagavrilov closed 6 years ago

sashagavrilov commented 6 years ago

result.coverageMap !== 'undefined' results in true when result.coverageMap is null and call to logCoverage fails with

TypeError: Cannot read property 'getCoverageSummary' of undefined
    at logCoverage (node_modules/jest-teamcity-reporter/index.js:54:27)
    at teamcityReporter (node_modules/jest-teamcity-reporter/index.js:8:13)
    at processResults (node_modules/jest/node_modules/jest-cli/build/runJest.js:126:55)
    at node_modules/jest/node_modules/jest-cli/build/runJest.js:211:12
    at next (native)
    at step (node_modules/jest/node_modules/jest-cli/build/runJest.js:1:260)
    at /Users/lucker/POM/pom-frontend/node_modules/jest/node_modules/jest-cli/build/runJest.js:1:420
winterbe commented 6 years ago

Thanks.