File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -842,6 +842,8 @@ Vitest 提供的一组有用的辅助函数。
842842
843843等待回调成功执行。如果回调抛出错误或返回拒绝的承诺,它将继续等待,直到成功或超时。
844844
845+ 如果 ` options ` 设置为一个数字,其效果等同于设置 ` { timeout: options } ` 。
846+
845847这在需要等待某些异步操作完成时非常有用,例如,在启动服务器并需要等待其启动时。
846848
847849``` ts
Original file line number Diff line number Diff line change @@ -2069,7 +2069,7 @@ Vitest 通常使用缓存对测试进行排序,因此长时间运行的测试
20692069#### sequence.hooks
20702070
20712071- ** 类型** : ` 'stack' | 'list' | 'parallel' `
2072- - ** 默认值** : ` 'parallel ' `
2072+ - ** 默认值** : ` 'stack ' `
20732073- ** 命令行终端** : ` --sequence.hooks=<value> `
20742074
20752075更改钩子的执行顺序。
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ title: Interactivity API | Browser Mode
44
55# Interactivity API
66
7- Vitest 使用 [ Chrome DevTools Protocol] ( https://chromedevtools.github.io/devtools-protocol/ ) 或 [ webdriver] ( https://www.w3.org/TR/webdriver/ ) API 实现了 [ ` @testing-library/user-event ` ] ( https://testing-library.com/docs/user-event ) 应用程序接口的子集 ,而不是伪造事件,这使得浏览器行为更加可靠和一致。
7+ Vitest 使用 [ Chrome DevTools Protocol] ( https://chromedevtools.github.io/devtools-protocol/ ) 或 [ webdriver] ( https://www.w3.org/TR/webdriver/ ) 实现了 [ ` @testing-library/user-event ` ] ( https://testing-library.com/docs/user-event/intro ) 库的子集 API ,而不是伪造事件,这使得浏览器行为更加可靠和一致,符合用户与页面交互的方式 。
88
99``` ts
1010import { userEvent } from ' @vitest/browser/context'
You can’t perform that action at this time.
0 commit comments