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

[Windows 10] --notify does not create a notification. #9452

Closed
StringEpsilon opened this issue Jan 23, 2020 · 5 comments · Fixed by #9454
Closed

[Windows 10] --notify does not create a notification. #9452

StringEpsilon opened this issue Jan 23, 2020 · 5 comments · Fixed by #9454

Comments

@StringEpsilon
Copy link
Contributor

🐛 Bug Report

Running jest --notify does not create any notification on windows 10.

To Reproduce

Steps to reproduce the behavior:

  1. Install jest on any windows 10 machine.
  2. run any test suite with npx jest --notify

Expected behavior

A notification is shown, as described by the documentation:

Activates notifications for test results.

envinfo

  System:
    OS: Windows 10 10.0.16299
    CPU: [redacted]
  Binaries:
    Node: 12.14.0 - [redacted]
    Yarn: 1.17.3 - [redacted]
    npm: 6.13.4 - [redacted]
  npmPackages:
    jest: ^23.6.0 => 23.6.0

I also tested this with [email protected] which also doesn't show a notification.

@StringEpsilon
Copy link
Contributor Author

StringEpsilon commented Jan 23, 2020

Update: It works on the second try. I found out that node-notifier registers a new app with windows to be able to display the notification. See:

mikaelbr/node-notifier#144

I would not suspect any npm package to permanently alter my machine in such a way. Nor would I expect the option to be wonky in this particular fashion. You might want to warn people about that in the --notify documentation.

Edit: I also can't figure out how I can get rid of the entries in my start menu now :/

@SimenB
Copy link
Member

SimenB commented Jan 23, 2020

Yeah, this is an upstream issue. It does seems like we should warn in the docs though, as you say. Mind sending a PR?

@StringEpsilon
Copy link
Contributor Author

Something like this?

Activates notifications for test results. Good for when you don't want your consciousness to be able to focus on anything except JavaScript testing.
Beware: Jest uses node-notifier to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs.

@SimenB
Copy link
Member

SimenB commented Jan 23, 2020

Yeah, that seems reasonable 👍

@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.

2 participants