Skip to content

Commit a0f73c7

Browse files
committed
docs(cn): dissolve the conflict
1 parent e421bb5 commit a0f73c7

4 files changed

Lines changed: 9 additions & 22 deletions

File tree

api/expect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ it('render basic', async () => {
10111011
- **类型:** `(snapshot?: string, hint?: string) => void`
10121012

10131013
[`toMatchInlineSnapshot`](#tomatchinlinesnapshot) 类似,但期望的值与 [`toThrow`](#toThrow) 相同。
1014-
1014+
<!-- TODO: translation -->
10151015
## toMatchAriaSnapshot <Version type="experimental">4.1.4</Version> <Experimental /> {#tomatcharisnapshot}
10161016

10171017
- **Type:** `() => void`

guide/browser/aria-snapshots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ARIA Snapshots | Guide
33
outline: deep
44
---
5-
5+
<!-- TODO: translation -->
66
# ARIA Snapshots <Badge type="warning">experimental</Badge> <Version>4.1.4</Version>
77

88
ARIA snapshots let you test the accessibility structure of your pages. Instead of asserting against raw HTML or visual output, you assert against the accessibility tree — the same structure that screen readers and other assistive technologies use.

guide/reporters.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,9 @@ JSON 报告示例:
421421
```
422422

423423
::: info
424-
自Vitest 3起,如果启用了代码覆盖率功能,JSON 报告器会在 `coverageMap` 中包含覆盖率信息。
424+
自Vitest 3 起,如果启用了代码覆盖率功能,JSON 报告器会在 `coverageMap` 中包含覆盖率信息。
425425
:::
426-
427-
<<<<<<< HEAD
428-
### HTML 报告器 {#html-reporter}
429-
=======
426+
<!-- TODO: translation -->
430427
The `meta` field in each assertion result can be filtered via the `filterMeta` reporter option. It receives the key and value of each field and should return a falsy value to exclude the field from the report:
431428

432429
```ts
@@ -440,9 +437,7 @@ export default defineConfig({
440437
},
441438
})
442439
```
443-
444-
### HTML Reporter
445-
>>>>>>> 5755951bae9c1f29ead80a0df48c81f2d0a46248
440+
### HTML 报告器 {#html-reporter}
446441

447442
生成 HTML 文件,通过交互式 [GUI](/guide/ui) 查看测试结果。文件生成后,Vitest 将保持本地开发服务器运行,并提供一个链接,以便在浏览器中查看报告。
448443

guide/snapshot.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,7 @@ test('button looks correct', async () => {
123123
```
124124

125125
它会捕获屏幕截图并与参考图像进行比较,以检测意外的视觉变化。在 [视觉回归测试指南](/guide/browser/visual-regression-testing)中了解更多内容。
126-
127-
<<<<<<< HEAD
128-
## 自定义序列化器 {#custom-serializer}
129-
=======
126+
<!-- TODO: translation -->
130127
## ARIA Snapshots <Badge type="warning">experimental</Badge> <Version>4.1.4</Version>
131128

132129
ARIA snapshots capture the accessibility tree of a DOM element and compare it against a stored template. Based on [Playwright's ARIA snapshots](https://playwright.dev/docs/aria-snapshots), they provide a semantic alternative to visual regression testing — asserting structure and meaning rather than pixels.
@@ -159,8 +156,7 @@ test('navigation structure', async () => {
159156

160157
See the dedicated [ARIA Snapshots guide](/guide/browser/aria-snapshots) for syntax details, retry behavior in Browser Mode, and file vs. inline snapshot examples. See [`toMatchAriaSnapshot`](/api/expect#tomatcharisnapshot) and [`toMatchAriaInlineSnapshot`](/api/expect#tomatchariainlinesnapshot) for the full API reference.
161158

162-
## Custom Serializer
163-
>>>>>>> 5755951bae9c1f29ead80a0df48c81f2d0a46248
159+
## 自定义序列化器 {#custom-serializer}
164160

165161
你可以添加自己的逻辑来修改快照的序列化方式。像 Jest 一样,Vitest 默认有内置的 JavaScript 类型、HTML 元素、ImmutableJS 和 React 元素提供了默认的序列化程序。
166162

@@ -327,10 +323,7 @@ declare module 'vitest' {
327323
::: tip
328324
See [Extending Matchers](/guide/extending-matchers) for more on `expect.extend` and custom matcher conventions.
329325
:::
330-
331-
<<<<<<< HEAD
332-
## 与 Jest 的区别 {#difference-from-jest}
333-
=======
326+
<!-- TODO: translation -->
334327
## Custom Snapshot Domain <Badge type="warning">experimental</Badge> <Version>4.1.4</Version> {#custom-snapshot-domain}
335328

336329
Custom serializers control how values are _rendered_ into snapshot strings, but comparison is still string equality. A **domain snapshot adapter** goes further: it owns the entire comparison pipeline for a custom matcher, including how to capture a value, render it, parse a stored snapshot, and match them semantically.
@@ -517,8 +510,7 @@ test('user data inline', () => {
517510
})
518511
```
519512

520-
## Difference from Jest
521-
>>>>>>> 5755951bae9c1f29ead80a0df48c81f2d0a46248
513+
## 与 Jest 的区别 {#difference-from-jest}
522514

523515
Vitest 提供了与 [Jest](https://jestjs.io/docs/snapshot-testing) 几乎兼容的快照功能,除少数例外:
524516

0 commit comments

Comments
 (0)