Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/disableconsoleintercept.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ outline: deep
- **类型:** `boolean`
- **命令行终端:** `--disableConsoleIntercept`
- **默认值:** `false`
<!-- TODO: translation -->
By default, Vitest intercepts console output during tests to add context such as the test file and test title.

In [browser mode](/guide/browser/), this interception is required to forward logs from the browser DevTools to the terminal. It is also required for console log previews in the Vitest UI.
测试文件和测试标题之类的上下文信息。
Comment thread
NoiseFan marked this conversation as resolved.
Outdated

Disabling console interception can be useful when you want to debug code with normal synchronous terminal logging.
在 [浏览器测试](/guide/browser/) 必须启用这种拦截机制,才能将浏览器开发者工具中的日志转发到终端。
Comment thread
NoiseFan marked this conversation as resolved.

适用于你想禁用控制台拦截,并以正常的同步终端日志记录的形式来调试代码的场景。
Loading