Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REGRESSION]: SIGINT handler is not called #10052

Closed
aslushnikov opened this issue May 15, 2020 · 3 comments
Closed

[REGRESSION]: SIGINT handler is not called #10052

aslushnikov opened this issue May 15, 2020 · 3 comments

Comments

@aslushnikov
Copy link

💥 Regression Report

  • OS: Mac
  • Jest version: v26.0.1

SIGINT handler is not called in jest scripts.

I'm coming here originally from microsoft/playwright#2261 (and we had some previous history with this at puppeteer/puppeteer#2428)

Last working version

Definitely works for me in v20.0.0

To Reproduce

  1. Save the following as example.test.js:
// this is `example.test.js`

process.on('SIGINT', () => console.log('SIGINT was called!'));

test("demo", async () => {
  console.log('running test');
  await new Promise(() => {});
});
  1. Run test: npx jest@v26.0.1

  2. Once running test is printed, hit Ctrl-C.

Expected behavior

Expected to see SIGINT was called! in the console

Link to repl or repo (highly encouraged)

Here's the repo with a similar repro. Due to this bug, Playwright doesn't handle SIGINT and doesn't close browser:

https://github.com/jperl/pw-close-repro

Run npx envinfo --preset jest

System:
OS: macOS 10.15.4
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Binaries:
Node: 14.2.0 - ~/.nvm/versions/node/v14.2.0/bin/node
npm: 6.14.4 - ~/.nvm/versions/node/v14.2.0/bin/npm
npmPackages:
jest: ^26.0.0 => 26.0.1


@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions
Copy link

github-actions bot commented May 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant