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.
silent still works when disableConsoleIntercept is true. In that case, logs do not go through the reporter console interception pipeline, so onConsoleLog and printConsoleTrace still do not apply. However, with silent: 'passed-only', Rstest still buffers logs internally and replays the matching logs through the original console output after failed tasks finish.