diff --git a/guide/browser/config.md b/guide/browser/config.md index 5d4cfcfc..38262d2f 100644 --- a/guide/browser/config.md +++ b/guide/browser/config.md @@ -301,7 +301,7 @@ export interface BrowserScript { - **Default:** `[]` ::: danger -This API is deprecated an will be removed in Vitest 4. Please, use [`browser.testerHtmlPath`](#browser-testerHtmlPath) field instead. +This API is deprecated an will be removed in Vitest 4. Please, use [`browser.testerHtmlPath`](#browser-testerhtmlpath) field instead. ::: Custom scripts that should be injected into the tester HTML before the tests environment is initiated. This is useful to inject polyfills required for Vitest browser implementation. It is recommended to use [`setupFiles`](#setupfiles) in almost all cases instead of this. diff --git a/guide/browser/locators.md b/guide/browser/locators.md index 5d72883b..e085f3e7 100644 --- a/guide/browser/locators.md +++ b/guide/browser/locators.md @@ -7,7 +7,11 @@ outline: [2, 3] 定位器是元素或多个元素的表示。每个定位器由一个称为选择器的字符串定义。Vitest 通过提供方便的方法在后台生成这些选择器,从而抽象了选择器。 +<<<<<<< HEAD 定位器 API 使用了 [Playwright 定位器](https://playwright.dev/docs/api/class-locator)的一个分支,称为 [Ivya](https://npmjs.com/ivya)。然而,Vitest 将此 API 提供给每一个 [provider](/guide/browser/#provider-configuration)。 +======= +The locator API uses a fork of [Playwright's locators](https://playwright.dev/docs/api/class-locator) called [Ivya](https://npmjs.com/ivya). However, Vitest provides this API to every [provider](/guide/browser/config.html#browser-provider). +>>>>>>> 357d7b64d5b5d96bd2f029df9140cab3737a93a5 ## getByRole diff --git a/guide/mocking.md b/guide/mocking.md index 5dfcf875..d240dc5b 100644 --- a/guide/mocking.md +++ b/guide/mocking.md @@ -178,6 +178,7 @@ Vitest 支持模拟 Vite [虚拟模块](https://cn.vitejs.dev/guide/api-plugin#v ```ts [vitest.config.js] import { defineConfig } from 'vitest/config' +import { resolve } from 'node:path' export default defineConfig({ test: { alias: {