Skip to content

Commit 948e4f0

Browse files
committed
docs(en): merging all conflicts
2 parents 1109755 + 7e382ef commit 948e4f0

File tree

5 files changed

+45
-3
lines changed

5 files changed

+45
-3
lines changed

api/expect-typeof.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,3 +552,23 @@ expectTypeOf(obj).toHaveProperty('a').toBeNumber()
552552
expectTypeOf(obj).toHaveProperty('b').toBeString()
553553
expectTypeOf(obj).toHaveProperty('a').not.toBeString()
554554
```
555+
556+
## branded
557+
558+
- **Type:** `ExpectTypeOf<BrandedType>`
559+
560+
You can use `.branded` to allow type assertions to succeed for types that are semantically equivalent but differ in representation.
561+
562+
```ts
563+
import { expectTypeOf } from 'vitest'
564+
565+
// Without .branded, this fails even though the types are effectively the same
566+
expectTypeOf<{ a: { b: 1 } & { c: 1 } }>().toEqualTypeOf<{ a: { b: 1; c: 1 } }>()
567+
568+
// With .branded, the assertion succeeds
569+
expectTypeOf<{ a: { b: 1 } & { c: 1 } }>().branded.toEqualTypeOf<{ a: { b: 1; c: 1 } }>()
570+
```
571+
572+
::: warning
573+
This helper comes at a performance cost and can cause the TypeScript compiler to 'give up' if used with excessively deep types. Use it sparingly and only when necessary.
574+
:::

config/experimental.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ outline: deep
77

88
## experimental.fsModuleCache <Version type="experimental">4.0.11</Version> {#experimental-fsmodulecache}
99

10+
::: tip FEEDBACK
11+
Please, leave feedback regarding this feature in a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9221).
12+
:::
13+
1014
- **Type:** `boolean`
1115
- **Default:** `false`
1216

@@ -103,6 +107,10 @@ At the moment, Vitest ignores the [test.cache.dir](/config/cache) or [cacheDir](
103107

104108
## experimental.openTelemetry <Version type="experimental">4.0.11</Version> {#experimental-opentelemetry}
105109

110+
::: tip FEEDBACK
111+
Please, leave feedback regarding this feature in a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9222).
112+
:::
113+
106114
- **Type:**
107115

108116
```ts
@@ -168,6 +176,10 @@ It's important that Node can process `sdkPath` content because it is not transfo
168176

169177
## experimental.printImportBreakdown <Version type="experimental">4.0.15</Version> {#experimental-printimportbreakdown}
170178

179+
::: tip FEEDBACK
180+
Please, leave feedback regarding this feature in a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9224).
181+
:::
182+
171183
- **Type:** `boolean`
172184
- **Default:** `false`
173185

config/onstacktrace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ outline: deep
77

88
- **Type**: `(error: Error, frame: ParsedStack) => boolean | void`
99

10-
Apply a filtering function to each frame of each stack trace when handling errors. This does not apply to stack traces printed by [`printConsoleTrace`](#printConsoleTrace). The first argument, `error`, is a `TestError`.
10+
Apply a filtering function to each frame of each stack trace when handling errors. This does not apply to stack traces printed by [`printConsoleTrace`](/config/printconsoletrace#printconsoletrace). The first argument, `error`, is a `TestError`.
1111

1212
Can be useful for filtering out stack trace frames from third-party libraries.
1313

guide/open-telemetry.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Open Telemetry Support <Experimental /> {#open-telemetry-support}
22

3-
::: tip Example Project
3+
::: tip FEEDBACK
4+
Please, leave feedback regarding this feature in a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9222).
5+
:::
46

7+
::: tip Example Project
58
[GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/opentelemetry)
6-
79
:::
810

911
[OpenTelemetry](https://opentelemetry.io/) traces can be a useful tool to debug the performance and behavior of your application inside tests.

guide/ui.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,15 @@ npx vite preview --outDir ./html
129129

130130
### 导入耗时分析 {#import-breakdown}
131131

132+
<<<<<<< HEAD
132133
模块图选项卡还会提供导入耗时分析功能,默认显示加载时间最长的10个模块(点击"显示更多"可追加10个),按总耗时排序。
134+
=======
135+
::: tip FEEDBACK
136+
Please, leave feedback regarding this feature in a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions/9224).
137+
:::
138+
139+
The Module Graph tab also provides an Import Breakdown with a list of modules that take the longest time to load (top 10 by default, but you can press "Show more" to load 10 more), sorted by Total Time.
140+
>>>>>>> 7e382ef570c2a5c18427069cc851ce758b47aef7
133141
134142
<img alt="Import breakdown with a list of top 10 modules that take the longest time to load" img-light src="/ui/light-import-breakdown.png">
135143
<img alt="Import breakdown with a list of top 10 modules that take the longest time to load" img-dark src="/ui/dark-import-breakdown.png">

0 commit comments

Comments
 (0)