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.

Tests hang when running

See original GitHub issue

I have a test like this:

test('renders without crashing', () => {
  // const div = document.createElement('div');
  // ReactDOM.render(<App />, div);
  expect(true).toBe(true)
});

when I run it, with npm t it hangs. here is the output

→ npm t --loglevel=silly
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/Cellar/node/6.6.0/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   't',
npm verb cli   '--loglevel=silly' ]
npm info using npm@3.10.7
npm info using node@v6.6.0
npm verb run-script [ 'pretest', 'test', 'posttest' ]
npm info lifecycle reg-dashboard@0.1.0~pretest: reg-dashboard@0.1.0
npm sill lifecycle reg-dashboard@0.1.0~pretest: no script for pretest, continuing
npm info lifecycle reg-dashboard@0.1.0~test: reg-dashboard@0.1.0

> reg-dashboard@0.1.0 test /Users/luizeduardo/js_dev/reg-dashboard
> react-scripts test --env=jsdom

I’m running macOS Sierra with. I can reproduce it with a new app as well.

the react-scripts:

→ npm ls react-scripts
reg-dashboard@0.1.0 /Users/luizeduardo/js_dev/reg-dashboard
├── react-scripts@0.4.1
``

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (14 by maintainers)

github_iconTop GitHub Comments

14reactions
gaearoncommented, Sep 23, 2016

As mentioned in https://github.com/facebook/jest/issues/1767#issuecomment-248883102, can you try running

brew install watchman

?

7reactions
luizkowalskicommented, Sep 23, 2016

uninstall watchman fixed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Explorer hangs when running a large batch of tests
The hang occurs at various points in the process. Running the tests 40-100 at a time they all complete, mostly passing but a...
Read more >
Unit Tests are hang when running i… | Apple Developer Forums
My problem is that sometimes the tests are running successfully, but sometimes I run into a hanging state in the middle of running...
Read more >
Running unit tests hangs indefinitely · Issue #242 - GitHub
Running units test hangs indefinitely · Open the cloned folder with Visual Studio Code (1.41.1) · Try to run discovered tests... they hang....
Read more >
xUnit Tests hang on Run all [closed] - Stack Overflow
However, if I run them all with xUnit, it seems like a random amount of tests finish and then it hangs. No tests...
Read more >
dotnet test command - .NET CLI | Microsoft Learn
The dotnet test command is used to execute unit tests in a given ... Run the tests in blame mode and collects a...
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