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 test suite fails to run

See original GitHub issue

I’m submitting a bug report

  • Library Version: 0.32.0

Please tell us about your environment:

  • Operating System: Windows 10

  • Node Version: 8.9.4

  • NPM Version: 5.5.1
  • Browser: Chrome 64.0.3282.140 (Official Build) (64-bit)

  • Language: all

  • Loader/bundler: Webpack

Current behavior: Running au jest fails to run the pre-configured test and prints this output

...\au-webpack-babel-jest> au jest
 FAIL  test\unit\app.spec.js
  ● Test suite failed to run

    TypeError: Cannot read property 'Node' of undefined

      at patchNotifyChange (node_modules/aurelia-pal-nodejs/dist/nodejs-pal-builder.js:55:35)
      at Object.<anonymous> (test/jest-pretest.js:6:33)

Test Suites: 1 failed, 1 total
  • What is the expected behavior? Steps to reproduce

Run au new

Project Configuration
    Name: au-webpack-babel-jest
    Platform: Web
    Bundler: Webpack
    Loader: None
    Transpiler: Babel
    Markup Processor: None
    CSS Processor: None
    Unit Test Runner: Jest
    Integration Test Runner: None
    Editor: Visual Studio Code

Would you like to create this project? [Yes]

Would you like to install the project dependencies? [Yes]

Run au jest

  • What is the motivation / use case for changing the behavior? So newly created projects using Jest work out of the box.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
Alexander-Tarancommented, Feb 10, 2018

It has been fixed in “aurelia-pal-nodejs”: “1.0.0-beta.3.0.0”, you got to update the dependency manually for now. I cant find the issue at the moment but I stumbled upon the same behavior and found it somewhere around here. So there you have it (-:

1reaction
Alexander-Tarancommented, Mar 5, 2018

yeah… and get rid of npm as well (-: yarn add ftw…

biased opinion

Read more comments on GitHub >

github_iconTop Results From Across the Web

jest: Test suite failed to run, SyntaxError: Unexpected token ...
Jest sets the env variable to test, so I had to add my presets to the env setting in .babelrc: { "plugins": ["syntax-dynamic-import", ......
Read more >
Jest test suite failed to run with v6.4.1 · Issue #1186 - GitHub
We have some mocks in a private npm namespace. A couple of these were mocked in the mocks folder in the root of...
Read more >
Troubleshooting - Jest
Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why​. Try using the debugging support built into...
Read more >
Debugging jest tests in javascript/typescript projects when ...
Debugging jest tests in javascript/typescript projects when running specific test fails if test has " or ` or ' characters in its name....
Read more >
Setting Up Jest - LearnHowToProgram.com
$ npm run test > shape-tracker@1.0.0 test > jest FAIL __tests__/triangle.test.js ○ Test suite failed to run Your test suite ...
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