-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Manual rerun doesn't work when verbose mode is off #2458
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
Comments
Nice find @pcdevil! Hopefully we can do some more copy/pasting to solve this?
That'd be amazing. #2217 summarizes an approach. If it's an incentive, this would help solve many other issues that have bounties on them, see this list: https://github.com/avajs/ava/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Ascope%3Areporters+label%3A%22%3Adollar%3A+Funded+on+Issuehunt%22 |
@novemberborn thanks for the kind response!
I'd prefer another approach :) I see there were interest from others for #2217 - can I consider it is up for grabs for now? |
Sure, but copy/pasting will at least get a fix out sooner.
Sounds great. If you comment on that issue I can assign it to you. |
I will see how I can handle - I'm just generally against "ohh, I just copy this piece of code and it will be fine" method, but yes, you are right, the sooner fix the better!
Done! I'd separate the work with the two issue to reduce the footprint of the fix itself and presumably make it more rapidly. |
Yea. Rebuilding the reporters is a lot of work. |
Hello,
I'm using AVA with watch mode, and noticed the manual rerun doesn't work if
verbose
mode is off in the config.Setup
related package.json part:
ava.config.verbose-off.js:
ava.config.verbose-on.js:
Expected behaviour
When I run the
npm run test
command the tests can be manually rerun by typingr + <Enter>
.Actual behaviour
The documented feature doesn't triggers AVA to rerun the tests, while using the
npm run test:verbose
task works properly.Potential cause
I see AVA uses the MiniReporter and VerboseReporter respectively, and while Watcher.observeStdin() registers callback for the
"data"
event onstdin
, it will never be called somehow when the MiniReporter is used.Due to the lack of domain knowledge I didn't dig deeper, but I see the two reporters have very similar codebase and I suspect a modification was not applied on both classes which made the MiniReporter behave incorrectly.
The amount of code duplication and the potential cause leads me to believe a targeted refactor would be beneficial to eliminate future discrepancies.
With some guidance from a maintainer I'd happily work on this, but I didn't want to just jump and into and endless pit :)
The text was updated successfully, but these errors were encountered: