Jest notifies me as follows that 100% of 0 tests passed when I save any file in my watched directories, even if there are no tests associated with it. What is the utility of this?
Steps to reproduce the behavior:
--watch --notifyNo tests found related to files changed since last commit.
Notifications are only shown when tests are run
PR welcome!
I think a notification might make sense? But it should say "no tests ran" or something.
Code is here: https://github.com/facebook/jest/blob/master/packages/jest-cli/src/reporters/notify_reporter.js
Happy to pick this one up.
What's the proposed format as currently the notifier expects a message and a title?
Awesome! Title maybe "No tests were run", and an empty message?
My thinking was that there should be no notification unless some tests are run. What鈥檚 the point of a notification that says nothing ran?
Yeah this makes sense to me as well as the expected behaviour. Could simply check result of the test run and exit early from the notifier logic if numTotalTests === 0?
@thymikee @rickhanlonii thoughts?
I think such "empty" notifications may be annoying, especially when fiddling with git a lot. I'm OK with not displaying it whenever there were no tests run.
Please, add an options to notify in case of faled test only
Failed only is already an option: https://facebook.github.io/jest/docs/en/configuration.html#notifymode-string
@SimenB sorry, not noticed (
but...
notify: true,
notifyMode: 'failure',
shows notification if test is passed successfully
jest: "^23.1.0",
OS: Windos 7
Closed via #6495
Most helpful comment
I think such "empty" notifications may be annoying, especially when fiddling with git a lot. I'm OK with not displaying it whenever there were no tests run.