silent
- Type:
boolean | 'passed-only' - Default:
false - CLI:
--silent [value]
Silence intercepted console output from tests.
- Set
trueto hide all intercepted console logs. - Set
'passed-only'to keep intercepted logs only for failed files, suites, and test cases.
Example
When silent is set to 'passed-only', console logs from passing tasks are buffered and discarded, while logs from failed tasks are replayed with the failure output.
Only fail log will be printed.
Rstest tries to attribute logs to specific tests, but in concurrent asynchronous test scenarios in browser mode, log attribution may not be perfectly accurate.
In browser mode, this interception still calls the original console.* so logs can remain visible in DevTools. silent controls Rstest/reporter output, not necessarily the browser's native console view.
Under silent: 'passed-only', the logs replayed from failed tasks still pass through onConsoleLog, so a filter that returns false drops them from the replay as well.
silent still works when disableConsoleIntercept is true, but the replay differs by environment. In Node mode the buffered logs are replayed to the original stdout/stderr, bypassing onConsoleLog and printConsoleTrace. In browser mode there is no host-side original stream, so the replay is not forwarded to the terminal — those logs stay visible only in the browser DevTools.