-
Notifications
You must be signed in to change notification settings - Fork 779
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: Avoid MaxListeners warning in long-running watch mode
The three process event handlers all stateless and can be re-used and naturally find the latest 'QUnit' instance in lexical scope. I considered attaching these once early on, and then leaving them there across restarts. However, this caused certain early failures to become silent, such as the test for `qunit single.js --require does-not-exist`, because once you attach 'uncaughtException', Node.js removes its own implicit default handler that prints the error and sets exit code 1, and we're able to print the error yet that early as the reporters are not yet set up yet at that point. Instead, we can keep the timing of when they are attached as-is and remove them again as-needed during watch/restart/cleanupQUnit. Fixes #1692.
- Loading branch information
Showing
1 changed file
with
42 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters