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.

Jest coverage reports cause an error with v4.0.0-beta.2

See original GitHub issue

I just decided to give the latest beta a spin, and it worked well for running the unit tests, but when also trying to add a coverage report, I got:

resources/components/NotificationBox/NotificationBox.spec.js
  ● Test suite failed to run

    /home/daniel/Repos/omm/resources/components/NotificationBox/NotificationBox.vue: don't know how to turn this value into a node

      at valueToNode (node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js:87:9)
      at Object.valueToNode (node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js:81:58)
      at Object.exit (node_modules/istanbul-lib-instrument/dist/visitor.js:638:30)
      at PluginPass.exit (node_modules/babel-plugin-istanbul/lib/index.js:158:38)
      at newFn (node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js:179:21)
      at NodePath._call (node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:55:20)
      at NodePath.call (node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:42:17)
      at NodePath.visit (node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:99:8)
      at TraversalContext.visitQueue (node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js:112:16)
      at TraversalContext.visitSingle (node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js:84:19)
      at TraversalContext.visit (node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js:140:19)
      at Function.traverse.node (node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js:84:17)
      at traverse (node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js:66:12)
      at transformFile (node_modules/@babel/core/lib/transformation/index.js:107:29)
          at transformFile.next (<anonymous>)
      at run (node_modules/@babel/core/lib/transformation/index.js:35:12)

Downgrading to v3.0.5 fixed the issue and printed out coverage reports again.

I am using:

"babel-jest": "^25.5.1",
"jest": "^25.5.3",
"nuxt": "^2.12.2",

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:18
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Petercoptercommented, May 8, 2020

I’m using

babel-jest@25.4.0
jest@25.4.0
nuxt@2.12.2
vue-jest@4.0.0-beta.2

Trying to upgrade to babel-jest@26.0.1 and jest@26.0.1 results in

don't know how to turn this value into a node
1reaction
aantipovcommented, Sep 15, 2020

I just tested and it works! I’m glad I could help with it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running tests and creating code coverage reports for React ...
We have three ways to produce a code coverage report: Cobertura Jenkins Plugin — a utility for code coverage that will collect the...
Read more >
CHANGELOG.old.md - mui/material-ui - Sourcegraph
This release fixes an important issue with Chrome 88. The usage of NaN as a CSS property with JSS throws an exception. @material-ui/core@v4.11.3....
Read more >
material-ui/core/CHANGELOG.md - UNPKG
If no warnings are reported in the console, you are set for this first batch. ... 713, The coverage has increased from 50...
Read more >
Error processing coverage reports with Jest and Github Action
Description I just spun up a new project and am uploading JavaScript test coverage reports (generated by Jest) to Codecov using the action ......
Read more >
Measuring Typescript Code Coverage with Jest and GitHub ...
Let's get started and take a look at how these tools will come together to help generate a code coverage report. The full...
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