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.

globalTeardown not called when stopping jest via ctrl+c

See original GitHub issue

Hey, I want to report a bug / missing feature (depends on the point of view).

Current behavior When you cancel jest via ctrl + c the globalTeardown hook is not called.

Minimal example https://github.com/ansgarm/jest-global-teardown-bug

Expected behavior The globalTeardown hook should be called.

Run npx envinfo --preset jest in your project directory and paste the results here System: OS: macOS High Sierra 10.13.1 CPU: x64 Intel® Core™ i5-5257U CPU @ 2.70GHz Binaries: Node: 8.9.3 - ~/.nvm/versions/node/v8.9.3/bin/node Yarn: 1.3.2 - ~/.yarn/bin/yarn npm: 5.7.1 - ~/.nvm/versions/node/v8.9.3/bin/npm npmPackages: jest: ^22.4.3 => 22.4.3

Best! Ansgar

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
goldocommented, Feb 7, 2019

any news on this one ?

3reactions
pavoltravnikcommented, Mar 27, 2020

Can anyone explain why, process.on('SIGINT', () => { console.log('SIGINT signal') }) is not executed while running jest and aborting job by ctrl+c?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest globalTeardown not run after test is failed - Stack Overflow
I am trying to start and stop serverless application ...
Read more >
Setup and Teardown - Jest
You have a method initializeCityDatabase() that must be called before each of these tests, and a method clearCityDatabase() that must be ...
Read more >
7 Ways to Debug Jest Tests in Terminal - Pragmatic Pineapple
And voilà, your tests should run and stop at the debugger in the DevTools you ... Often in projects, you are not using...
Read more >
Jest process doesn't quit after last test completes - Bleep Coder
I'm having issues with the Jest process not completing after the last test ... The user will have to force quit the process...
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