question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[test-runner] Cannot read property 'decl' of undefined in coverage UI

See original GitHub issue

Two files in the PR for vaadin-date-picker have this problem:

Cannot read property 'decl' of undefined
TypeError: Cannot read property 'decl' of undefined
    at /Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-reports/lib/html/annotator.js:89:31
    at Array.forEach ()
    at annotateFunctions (/Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-reports/lib/html/annotator.js:86:29)
    at annotateSourceCode (/Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-reports/lib/html/annotator.js:234:9)
    at HtmlReport.onDetail (/Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-reports/lib/html/index.js:409:33)
    at LcovReport. [as onDetail] (/Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-reports/lib/lcov/index.js:28:23)
    at Visitor.value (/Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-lib-report/lib/tree.js:38:38)
    at ReportNode.visit (/Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-lib-report/lib/tree.js:88:21)
    at /Users/sergey/vaadin/vaadin-date-picker-new/node_modules/istanbul-lib-report/lib/tree.js:92:19
    at Array.forEach ()

As you can see the numbers are there:

Screenshot 2020-10-05 at 13 30 19

But when opening the files, I get this:

Screenshot 2020-10-05 at 13 30 26

Screenshot 2020-10-05 at 13 30 33

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mario-aleocommented, Nov 30, 2020

@LarsDenBakker, sorry for the late response. I’ve just tried and didn’t work, as I’ve reported at istanbuljs/v8-to-istanbul#121, I’ll create a repository with this error so you can easily reproduce it 😃

1reaction
LarsDenBakkercommented, Nov 17, 2020

The karma config used babel for instrumenting code as well. We switched to using chromium for speed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[test-runner] Cannot read property 'decl' of undefined in coverage UI -
Two files in the PR for vaadin-date-picker have this problem: Cannot read property 'decl' of undefined TypeError: Cannot read property 'decl' of undefined ......
Read more >
Aurelia/Karma/Istanbul Cannot read property 'skip' and 'decl ...
The first error about the 'decl' is from a @inject in my code. ... the 'TypeError: Cannot read property 'skip' of undefined' error...
Read more >
Unit Testing in React: Full Guide on Jest and Enzyme Testing
During reading, I'll cover the next topics: Define the correct order of components' testing based on project structure; Find what to omit in...
Read more >
istanbuljs/nyc - Gitter
TypeError : Cannot read property 'start' of undefined at ./node_modules/nyc/node_modules/istanbul-reports/lib/lcovonly/index.js:32:43 at Array.
Read more >
Configuring Jest
For example, you may hide coverage report lines for all fully-covered files: JavaScript; TypeScript. /** @type {import('jest').Config} */
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found