Question
Does Mocha need a built‑in option to mute console output when a desktop notification is fired?
Tasadduq BurneyownerOwner · Founder
28K reputation · 29 Mar 2023, 03:45 UTC
36.8K views0
Goal: receive a desktop popup only when a test fails while the terminal shows a compact representation (e.g., a single dot per test) to avoid duplicate information and notification noise.
Currently this requires pairing a minimal reporter such as
dot with a third‑party notifier like mocha‑notify and manually setting the notifier to fire on failure. The framework does not automatically hide stdout/stderr when a notification is displayed, leaving the user to choose a quiet reporter to prevent duplicated output. This raises the question of whether Mocha should provide a built‑in way to suppress console output when a desktop notification is shown.
Should Mocha add a flag that hides console output when a desktop notification is triggered? Could this behavior be implemented via a wrapper reporter that conditionally silences streams? What are the trade‑offs between keeping full output for debugging and suppressing it to reduce noise?