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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing a notify flag complains that jest doesn't exit after the test run has completed #8036

Closed
natealcedo opened this issue Mar 4, 2019 · 8 comments 路 Fixed by #9567
Closed

Comments

@natealcedo
Copy link
Contributor

馃挜 Regression Report

I'm not sure which last version this feature was working in but I've recreated a simple repo just to show that this feature isn't working as intended.

Last working version

I don't know which version this feature was working correctly.

Stopped working in version:

Currently running on jest 24.1

To Reproduce

Steps to reproduce the behavior:

Run any test suite with --notify flag

Here's a screenshot
image

Expected behavior

The test suite should exit cleanly.

Link to repl or repo (highly encouraged)

https://github.com/natealcedo/notify/

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS 10.14.3
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 8.15.0 - ~/.nvm/versions/node/v8.15.0/bin/node
    Yarn: 1.13.0 - ~/.nvm/versions/node/v8.15.0/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.15.0/bin/npm
  npmPackages:
    jest: ^24.1.0 => 24.1.0
@SimenB
Copy link
Member

SimenB commented Mar 4, 2019

Interesting! Seems like we don't clean up the notifier. I've tried to play around with timeout and wait with no luck. Not sure how to solve this. The notification behaves correctly even if I kill the node process running Jest. So I wonder if we just need a way for node-notifier to really fire and forget - now it seems it waits no matter what for terminal-notifier (on mac) to exit.

All the execs in here will cause the process to wait until they complete: https://github.com/mikaelbr/node-notifier/blob/2275295e570e9edf33105d4f62e9eb3e7dbb1b69/lib/utils.js#L54-L61

Maybe open up an issue there?

@trickpeeraze
Copy link

Found this issue as well :(

@abhishek-1985
Copy link

I think this issue is related to the node-notifier 5.4 version issue :- mikaelbr/node-notifier#271

According to node-notifier - As of 5.4.0, `timeout` defaults to `10`. In order to have a "fire and forgotten" notification, you need to set `timeout` to `false`.

@SimenB
Copy link
Member

SimenB commented Mar 14, 2019

Thanks for the link @abhishek-1985! Seems like they plan a revert and a major bump. This seems reasonable to me as updating old Jest's are difficult. Happy to bump our dependency here after they publish a major and set timeout: false like that PR adds

@SimenB
Copy link
Member

SimenB commented Aug 15, 2019

Change reverted in node-notifier. Will have to figure something about when upgrading to v6

@SimenB SimenB closed this as completed Aug 15, 2019
@shirshak55
Copy link

This issue really sucks today i got this issue and wasted whole lot of time . And I kept debugging if it was redis/ typeorm connection pool bla bla bla :(

@SimenB
Copy link
Member

SimenB commented Feb 12, 2020

Woops, reintroduced this when upgrading to v6. I'll fix it

@github-actions
Copy link

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 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants