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

Cannot read property 'decl' of undefined while merge json reports #37

Open
storenth opened this issue Feb 27, 2020 · 2 comments
Open

Cannot read property 'decl' of undefined while merge json reports #37

storenth opened this issue Feb 27, 2020 · 2 comments

Comments

@storenth
Copy link

  1. Jest instrument sources and produce .json reporter
  2. Then I collect coverage with babel-plugin-istanbul and get second .json report
  3. When I merge it with istanbul-merge I get the issue,

sessionEditor_merged

Looks like Jest instrument sources included import/export statements but babel-plugin-istanbul import/export statements are ignored (see screenshot: Jest on the left side and babel-plugin-istanbul on the right):

jest_babel_istanbul_coverage

My dependencies:

    "babel-plugin-istanbul": "^4.1.6",
    "jest": "22.4.4",
    "babel-core": "6.26.3",
    "babel-eslint": "8.2.3",
    "babel-jest": "22.4.4",
    "babel-loader": "7.1.4",
@ljharb
Copy link
Owner

ljharb commented Feb 27, 2020

hmm - the error is coming from istanbul-reports, which this package doesn't use. Is it possible that you're using the output of istanbul-merge to generate an HTML report, and that's where the error is coming from?

@storenth
Copy link
Author

storenth commented Mar 4, 2020

@ljharb I don't sure I correctly got your question. I am using the next merge-report-flow:

    "merge": "istanbul-merge --out .nyc_output/out.json unit_coverage/coverage-unit.json raw_coverage/coverage-ui.json",
    "coverage": "nyc report --reporter=lcov --exclude-after-remap=false"

coverage-unit.json from Jest with .json reporter and coverage-ui.json saved from browser window.__coverage__ while UI-test automation.
Also, I have activity under istanbuljs/babel-plugin-istanbul/issues/129 and istanbuljs/babel-plugin-istanbul/issues/135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants