vitest 1.0.0-beta.4 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -513
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +4 -4
- package/dist/child.js +13 -17
- package/dist/{chunk-api-setup.6d19ab38.js → chunks/api-setup.jHV5vgr2.js} +97 -39
- package/dist/chunks/install-pkg.ORGzQeqb.js +457 -0
- package/dist/chunks/integrations-globals.-pds_Gug.js +29 -0
- package/dist/{chunk-node-git.6c12e560.js → chunks/node-git.Hw101KjS.js} +1 -18
- package/dist/{chunk-runtime-console.f3263f87.js → chunks/runtime-console.iCAG0Yz3.js} +1 -1
- package/dist/cli-wrapper.js +2 -18
- package/dist/cli.js +18 -23
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +4 -6
- package/dist/config.js +1 -1
- package/dist/coverage.d.ts +25 -15
- package/dist/coverage.js +118 -49
- package/dist/entry-vm.js +13 -13
- package/dist/entry.js +14 -14
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +3 -3
- package/dist/index.d.ts +166 -38
- package/dist/index.js +10 -10
- package/dist/node.d.ts +5 -5
- package/dist/node.js +17 -22
- package/dist/{vendor-paths.84fc7a99.js → paths.js} +1 -1
- package/dist/{reporters-50c2bd49.d.ts → reporters-ANEBTnOh.d.ts} +324 -361
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +7 -8
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +8 -8
- package/dist/{suite-ad69b7cd.d.ts → suite-C1OmA61l.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +3 -3
- package/dist/{vendor-benchmark.b6befc50.js → vendor/benchmark.WVm6DARl.js} +1 -1
- package/dist/{vendor-execute.157302d6.js → vendor/execute.aMjV5C9u.js} +2 -4
- package/dist/{vendor-index.72df742e.js → vendor/index.Npc-eff0.js} +4 -4
- package/dist/{vendor-index.2b92937b.js → vendor/index.XU72Rmy8.js} +1 -1
- package/dist/{vendor-index.57925a34.js → vendor/index.h0j9y5vy.js} +5 -5
- package/dist/vendor/index.xL8XjTLv.js +3962 -0
- package/dist/vendor/loader.CU0NY2Is.js +39 -0
- package/dist/{vendor-node.65461b16.js → vendor/node.c-kzGvOB.js} +1874 -5960
- package/dist/{vendor-reporters.d24d80a4.js → vendor/reporters.1xKxm8im.js} +424 -374
- package/dist/{vendor-rpc.171f65fb.js → vendor/rpc.Bl-ysZIr.js} +1 -1
- package/dist/{vendor-run-once.fb836747.js → vendor/run-once.X3E7xx3F.js} +1 -1
- package/dist/{vendor-vi.3baa7c4a.js → vendor/vi.voNYQWB_.js} +4 -4
- package/dist/vm.js +13 -18
- package/dist/worker.js +13 -18
- package/index.cjs +5 -0
- package/package.json +49 -53
- package/dist/chunk-install-pkg.e1d6323e.js +0 -1740
- package/dist/chunk-integrations-globals.2b099e04.js +0 -29
- package/dist/vendor-index.8efe7746.js +0 -2236
- package/dist/vendor-loader.9c966f23.js +0 -2089
- /package/dist/{vendor-_commonjsHelpers.7d1333e8.js → vendor/_commonjsHelpers.jjO7Zipk.js} +0 -0
- /package/dist/{vendor-base.9c08bbd0.js → vendor/base._79unx2z.js} +0 -0
- /package/dist/{vendor-constants.538d9b49.js → vendor/constants.WSvnD_fn.js} +0 -0
- /package/dist/{vendor-coverage.78040316.js → vendor/coverage.v6aD8iAh.js} +0 -0
- /package/dist/{vendor-date.6e993429.js → vendor/date.W90-E5kF.js} +0 -0
- /package/dist/{vendor-environments.dcc4a34e.js → vendor/environments.hpEVJZPC.js} +0 -0
- /package/dist/{vendor-global.c3664e75.js → vendor/global.L7JRz1qU.js} +0 -0
- /package/dist/{vendor-index.1ca68bd5.js → vendor/index.cAUulNDf.js} +0 -0
- /package/dist/{vendor-inspector.209edf5a.js → vendor/inspector.lFAeuaAt.js} +0 -0
- /package/dist/{vendor-tasks.f9d75aed.js → vendor/tasks.IknbGB2n.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
|
-
import { ViteDevServer,
|
|
2
|
+
import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
|
|
3
3
|
import * as _vitest_runner from '@vitest/runner';
|
|
4
4
|
import { File, Test as Test$1, Suite, TaskResultPack, Task, CancelReason, Custom, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
5
5
|
import { RawSourceMap, FetchResult, ViteNodeResolveId, ModuleCacheMap, ViteNodeServerOptions } from 'vite-node';
|
|
@@ -15,116 +15,111 @@ import { MessagePort } from 'node:worker_threads';
|
|
|
15
15
|
import { Stats } from 'node:fs';
|
|
16
16
|
import * as chai from 'chai';
|
|
17
17
|
|
|
18
|
-
declare const
|
|
19
|
-
declare const Hint: unique symbol;
|
|
20
|
-
declare const
|
|
21
|
-
type
|
|
22
|
-
[
|
|
23
|
-
};
|
|
24
|
-
type
|
|
25
|
-
[Modifier]: '
|
|
26
|
-
};
|
|
27
|
-
type
|
|
28
|
-
[Modifier]: '
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
interface
|
|
64
|
-
[Kind]: '
|
|
65
|
-
static:
|
|
66
|
-
type: '
|
|
67
|
-
}
|
|
68
|
-
interface
|
|
69
|
-
[Kind]: '
|
|
70
|
-
static:
|
|
71
|
-
type: '
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[
|
|
75
|
-
|
|
76
|
-
type
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
[
|
|
91
|
-
}
|
|
92
|
-
type
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
type: 'string';
|
|
124
|
-
}
|
|
125
|
-
/** Creates a static type from a TypeBox type */
|
|
126
|
-
type Static<T extends TSchema, P extends unknown[] = []> = (T & {
|
|
127
|
-
params: P;
|
|
18
|
+
declare const Modifier: unique symbol;
|
|
19
|
+
declare const Hint: unique symbol;
|
|
20
|
+
declare const Kind: unique symbol;
|
|
21
|
+
type Evaluate<T> = T extends infer O ? {
|
|
22
|
+
[K in keyof O]: O[K];
|
|
23
|
+
} : never;
|
|
24
|
+
type TReadonly<T extends TSchema> = T & {
|
|
25
|
+
[Modifier]: 'Readonly';
|
|
26
|
+
};
|
|
27
|
+
type TOptional<T extends TSchema> = T & {
|
|
28
|
+
[Modifier]: 'Optional';
|
|
29
|
+
};
|
|
30
|
+
type TReadonlyOptional<T extends TSchema> = T & {
|
|
31
|
+
[Modifier]: 'ReadonlyOptional';
|
|
32
|
+
};
|
|
33
|
+
interface SchemaOptions {
|
|
34
|
+
$schema?: string;
|
|
35
|
+
/** Id for this schema */
|
|
36
|
+
$id?: string;
|
|
37
|
+
/** Title of this schema */
|
|
38
|
+
title?: string;
|
|
39
|
+
/** Description of this schema */
|
|
40
|
+
description?: string;
|
|
41
|
+
/** Default value for this schema */
|
|
42
|
+
default?: any;
|
|
43
|
+
/** Example values matching this schema */
|
|
44
|
+
examples?: any;
|
|
45
|
+
[prop: string]: any;
|
|
46
|
+
}
|
|
47
|
+
interface TKind {
|
|
48
|
+
[Kind]: string;
|
|
49
|
+
}
|
|
50
|
+
interface TSchema extends SchemaOptions, TKind {
|
|
51
|
+
[Modifier]?: string;
|
|
52
|
+
[Hint]?: string;
|
|
53
|
+
params: unknown[];
|
|
54
|
+
static: unknown;
|
|
55
|
+
}
|
|
56
|
+
interface NumericOptions<N extends number | bigint> extends SchemaOptions {
|
|
57
|
+
exclusiveMaximum?: N;
|
|
58
|
+
exclusiveMinimum?: N;
|
|
59
|
+
maximum?: N;
|
|
60
|
+
minimum?: N;
|
|
61
|
+
multipleOf?: N;
|
|
62
|
+
}
|
|
63
|
+
interface TBoolean extends TSchema {
|
|
64
|
+
[Kind]: 'Boolean';
|
|
65
|
+
static: boolean;
|
|
66
|
+
type: 'boolean';
|
|
67
|
+
}
|
|
68
|
+
interface TNull extends TSchema {
|
|
69
|
+
[Kind]: 'Null';
|
|
70
|
+
static: null;
|
|
71
|
+
type: 'null';
|
|
72
|
+
}
|
|
73
|
+
interface TNumber extends TSchema, NumericOptions<number> {
|
|
74
|
+
[Kind]: 'Number';
|
|
75
|
+
static: number;
|
|
76
|
+
type: 'number';
|
|
77
|
+
}
|
|
78
|
+
type ReadonlyOptionalPropertyKeys<T extends TProperties> = {
|
|
79
|
+
[K in keyof T]: T[K] extends TReadonlyOptional<TSchema> ? K : never;
|
|
80
|
+
}[keyof T];
|
|
81
|
+
type ReadonlyPropertyKeys<T extends TProperties> = {
|
|
82
|
+
[K in keyof T]: T[K] extends TReadonly<TSchema> ? K : never;
|
|
83
|
+
}[keyof T];
|
|
84
|
+
type OptionalPropertyKeys<T extends TProperties> = {
|
|
85
|
+
[K in keyof T]: T[K] extends TOptional<TSchema> ? K : never;
|
|
86
|
+
}[keyof T];
|
|
87
|
+
type RequiredPropertyKeys<T extends TProperties> = keyof Omit<T, ReadonlyOptionalPropertyKeys<T> | ReadonlyPropertyKeys<T> | OptionalPropertyKeys<T>>;
|
|
88
|
+
type PropertiesReducer<T extends TProperties, R extends Record<keyof any, unknown>> = Evaluate<(Readonly<Partial<Pick<R, ReadonlyOptionalPropertyKeys<T>>>> & Readonly<Pick<R, ReadonlyPropertyKeys<T>>> & Partial<Pick<R, OptionalPropertyKeys<T>>> & Required<Pick<R, RequiredPropertyKeys<T>>>)>;
|
|
89
|
+
type PropertiesReduce<T extends TProperties, P extends unknown[]> = PropertiesReducer<T, {
|
|
90
|
+
[K in keyof T]: Static<T[K], P>;
|
|
91
|
+
}>;
|
|
92
|
+
type TProperties = Record<keyof any, TSchema>;
|
|
93
|
+
type TAdditionalProperties = undefined | TSchema | boolean;
|
|
94
|
+
interface ObjectOptions extends SchemaOptions {
|
|
95
|
+
additionalProperties?: TAdditionalProperties;
|
|
96
|
+
minProperties?: number;
|
|
97
|
+
maxProperties?: number;
|
|
98
|
+
}
|
|
99
|
+
interface TObject<T extends TProperties = TProperties> extends TSchema, ObjectOptions {
|
|
100
|
+
[Kind]: 'Object';
|
|
101
|
+
static: PropertiesReduce<T, this['params']>;
|
|
102
|
+
additionalProperties?: TAdditionalProperties;
|
|
103
|
+
type: 'object';
|
|
104
|
+
properties: T;
|
|
105
|
+
required?: string[];
|
|
106
|
+
}
|
|
107
|
+
interface StringOptions<Format extends string> extends SchemaOptions {
|
|
108
|
+
minLength?: number;
|
|
109
|
+
maxLength?: number;
|
|
110
|
+
pattern?: string;
|
|
111
|
+
format?: Format;
|
|
112
|
+
contentEncoding?: '7bit' | '8bit' | 'binary' | 'quoted-printable' | 'base64';
|
|
113
|
+
contentMediaType?: string;
|
|
114
|
+
}
|
|
115
|
+
interface TString<Format extends string = string> extends TSchema, StringOptions<Format> {
|
|
116
|
+
[Kind]: 'String';
|
|
117
|
+
static: string;
|
|
118
|
+
type: 'string';
|
|
119
|
+
}
|
|
120
|
+
/** Creates a TypeScript static type from a TypeBox type */
|
|
121
|
+
type Static<T extends TSchema, P extends unknown[] = []> = (T & {
|
|
122
|
+
params: P;
|
|
128
123
|
})['static'];
|
|
129
124
|
|
|
130
125
|
/**
|
|
@@ -135,59 +130,51 @@ type Static<T extends TSchema, P extends unknown[] = []> = (T & {
|
|
|
135
130
|
*/
|
|
136
131
|
|
|
137
132
|
|
|
138
|
-
declare const RawSnapshotFormat:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
>;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
prop: TReadonly<TString<string>>;
|
|
184
|
-
tag: TReadonly<TString<string>>;
|
|
185
|
-
value: TReadonly<TString<string>>;
|
|
186
|
-
}>
|
|
187
|
-
>
|
|
188
|
-
>;
|
|
189
|
-
}>
|
|
190
|
-
>;
|
|
133
|
+
declare const RawSnapshotFormat: TObject<{
|
|
134
|
+
callToJSON: TReadonlyOptional<TBoolean>;
|
|
135
|
+
compareKeys: TReadonlyOptional<TNull>;
|
|
136
|
+
escapeRegex: TReadonlyOptional<TBoolean>;
|
|
137
|
+
escapeString: TReadonlyOptional<TBoolean>;
|
|
138
|
+
highlight: TReadonlyOptional<TBoolean>;
|
|
139
|
+
indent: TReadonlyOptional<TNumber>;
|
|
140
|
+
maxDepth: TReadonlyOptional<TNumber>;
|
|
141
|
+
maxWidth: TReadonlyOptional<TNumber>;
|
|
142
|
+
min: TReadonlyOptional<TBoolean>;
|
|
143
|
+
printBasicPrototype: TReadonlyOptional<TBoolean>;
|
|
144
|
+
printFunctionName: TReadonlyOptional<TBoolean>;
|
|
145
|
+
theme: TReadonlyOptional<
|
|
146
|
+
TObject<{
|
|
147
|
+
comment: TReadonlyOptional<TString<string>>;
|
|
148
|
+
content: TReadonlyOptional<TString<string>>;
|
|
149
|
+
prop: TReadonlyOptional<TString<string>>;
|
|
150
|
+
tag: TReadonlyOptional<TString<string>>;
|
|
151
|
+
value: TReadonlyOptional<TString<string>>;
|
|
152
|
+
}>
|
|
153
|
+
>;
|
|
154
|
+
}>;
|
|
155
|
+
|
|
156
|
+
declare const SnapshotFormat: TObject<{
|
|
157
|
+
callToJSON: TReadonlyOptional<TBoolean>;
|
|
158
|
+
compareKeys: TReadonlyOptional<TNull>;
|
|
159
|
+
escapeRegex: TReadonlyOptional<TBoolean>;
|
|
160
|
+
escapeString: TReadonlyOptional<TBoolean>;
|
|
161
|
+
highlight: TReadonlyOptional<TBoolean>;
|
|
162
|
+
indent: TReadonlyOptional<TNumber>;
|
|
163
|
+
maxDepth: TReadonlyOptional<TNumber>;
|
|
164
|
+
maxWidth: TReadonlyOptional<TNumber>;
|
|
165
|
+
min: TReadonlyOptional<TBoolean>;
|
|
166
|
+
printBasicPrototype: TReadonlyOptional<TBoolean>;
|
|
167
|
+
printFunctionName: TReadonlyOptional<TBoolean>;
|
|
168
|
+
theme: TReadonlyOptional<
|
|
169
|
+
TObject<{
|
|
170
|
+
comment: TReadonlyOptional<TString<string>>;
|
|
171
|
+
content: TReadonlyOptional<TString<string>>;
|
|
172
|
+
prop: TReadonlyOptional<TString<string>>;
|
|
173
|
+
tag: TReadonlyOptional<TString<string>>;
|
|
174
|
+
value: TReadonlyOptional<TString<string>>;
|
|
175
|
+
}>
|
|
176
|
+
>;
|
|
177
|
+
}>;
|
|
191
178
|
|
|
192
179
|
declare type SnapshotFormat = Static<typeof RawSnapshotFormat>;
|
|
193
180
|
|
|
@@ -301,16 +288,6 @@ declare type Refs = Array<unknown>;
|
|
|
301
288
|
|
|
302
289
|
declare type Test = (arg0: any) => boolean;
|
|
303
290
|
|
|
304
|
-
// Type definitions for @sinonjs/fake-timers 8.1
|
|
305
|
-
// Project: https://github.com/sinonjs/fake-timers
|
|
306
|
-
// Definitions by: Wim Looman <https://github.com/Nemo157>
|
|
307
|
-
// Rogier Schouten <https://github.com/rogierschouten>
|
|
308
|
-
// Yishai Zehavi <https://github.com/zyishai>
|
|
309
|
-
// Remco Haszing <https://github.com/remcohaszing>
|
|
310
|
-
// Jaden Simon <https://github.com/JadenSimon>
|
|
311
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
312
|
-
// TypeScript Version: 2.3
|
|
313
|
-
|
|
314
291
|
/**
|
|
315
292
|
* Names of clock methods that may be faked by install.
|
|
316
293
|
*/
|
|
@@ -495,7 +472,7 @@ declare class WorkspaceProject {
|
|
|
495
472
|
typechecker?: Typechecker;
|
|
496
473
|
closingPromise: Promise<unknown> | undefined;
|
|
497
474
|
browserProvider: BrowserProvider | undefined;
|
|
498
|
-
testFilesList: string[];
|
|
475
|
+
testFilesList: string[] | null;
|
|
499
476
|
private _globalSetups;
|
|
500
477
|
private _provided;
|
|
501
478
|
constructor(path: string | number, ctx: Vitest);
|
|
@@ -508,12 +485,12 @@ declare class WorkspaceProject {
|
|
|
508
485
|
get logger(): Logger;
|
|
509
486
|
getModulesByFilepath(file: string): Set<vite.ModuleNode>;
|
|
510
487
|
getModuleById(id: string): vite.ModuleNode | undefined;
|
|
511
|
-
getSourceMapModuleById(id: string):
|
|
512
|
-
getBrowserSourceMapModuleById(id: string):
|
|
488
|
+
getSourceMapModuleById(id: string): TransformResult$1['map'] | undefined;
|
|
489
|
+
getBrowserSourceMapModuleById(id: string): TransformResult$1['map'] | undefined;
|
|
513
490
|
get reporters(): Reporter[];
|
|
514
491
|
globTestFiles(filters?: string[]): Promise<string[]>;
|
|
515
|
-
globAllTestFiles(
|
|
516
|
-
isTestFile(id: string): boolean;
|
|
492
|
+
globAllTestFiles(include: string[], exclude: string[], includeSource: string[] | undefined, cwd: string): Promise<string[]>;
|
|
493
|
+
isTestFile(id: string): boolean | null;
|
|
517
494
|
globFiles(include: string[], exclude: string[], cwd: string): Promise<string[]>;
|
|
518
495
|
isTargetFile(id: string, source?: string): Promise<boolean>;
|
|
519
496
|
isInSourceTestFile(code: string): boolean;
|
|
@@ -605,11 +582,111 @@ interface ResolvedBrowserOptions extends BrowserConfigOptions {
|
|
|
605
582
|
api: ApiConfig;
|
|
606
583
|
}
|
|
607
584
|
|
|
585
|
+
type BuiltinPool = 'browser' | 'threads' | 'forks' | 'vmThreads' | 'typescript';
|
|
586
|
+
type Pool = BuiltinPool | (string & {});
|
|
587
|
+
interface PoolOptions extends Record<string, unknown> {
|
|
588
|
+
/**
|
|
589
|
+
* Run tests in `node:worker_threads`.
|
|
590
|
+
*
|
|
591
|
+
* Test isolation (when enabled) is done by spawning a new thread for each test file.
|
|
592
|
+
*
|
|
593
|
+
* This pool is used by default.
|
|
594
|
+
*/
|
|
595
|
+
threads?: ThreadsOptions & WorkerContextOptions;
|
|
596
|
+
/**
|
|
597
|
+
* Run tests in `node:child_process` using [`fork()`](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options)
|
|
598
|
+
*
|
|
599
|
+
* Test isolation (when enabled) is done by spawning a new child process for each test file.
|
|
600
|
+
*/
|
|
601
|
+
forks?: ForksOptions & WorkerContextOptions;
|
|
602
|
+
/**
|
|
603
|
+
* Run tests in isolated `node:vm`.
|
|
604
|
+
* Test files are run parallel using `node:worker_threads`.
|
|
605
|
+
*
|
|
606
|
+
* This makes tests run faster, but VM module is unstable. Your tests might leak memory.
|
|
607
|
+
*/
|
|
608
|
+
vmThreads?: ThreadsOptions & VmOptions;
|
|
609
|
+
}
|
|
610
|
+
interface ThreadsOptions {
|
|
611
|
+
/** Minimum amount of threads to use */
|
|
612
|
+
minThreads?: number;
|
|
613
|
+
/** Maximum amount of threads to use */
|
|
614
|
+
maxThreads?: number;
|
|
615
|
+
/**
|
|
616
|
+
* Run tests inside a single thread.
|
|
617
|
+
*
|
|
618
|
+
* @default false
|
|
619
|
+
*/
|
|
620
|
+
singleThread?: boolean;
|
|
621
|
+
/**
|
|
622
|
+
* Use Atomics to synchronize threads
|
|
623
|
+
*
|
|
624
|
+
* This can improve performance in some cases, but might cause segfault in older Node versions.
|
|
625
|
+
*
|
|
626
|
+
* @default false
|
|
627
|
+
*/
|
|
628
|
+
useAtomics?: boolean;
|
|
629
|
+
}
|
|
630
|
+
interface ForksOptions {
|
|
631
|
+
/** Minimum amount of child processes to use */
|
|
632
|
+
minForks?: number;
|
|
633
|
+
/** Maximum amount of child processes to use */
|
|
634
|
+
maxForks?: number;
|
|
635
|
+
/**
|
|
636
|
+
* Run tests inside a single fork.
|
|
637
|
+
*
|
|
638
|
+
* @default false
|
|
639
|
+
*/
|
|
640
|
+
singleFork?: boolean;
|
|
641
|
+
}
|
|
642
|
+
interface WorkerContextOptions {
|
|
643
|
+
/**
|
|
644
|
+
* Isolate test environment by recycling `worker_threads` or `child_process` after each test
|
|
645
|
+
*
|
|
646
|
+
* @default true
|
|
647
|
+
*/
|
|
648
|
+
isolate?: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Pass additional arguments to `node` process when spawning `worker_threads` or `child_process`.
|
|
651
|
+
*
|
|
652
|
+
* See [Command-line API | Node.js](https://nodejs.org/docs/latest/api/cli.html) for more information.
|
|
653
|
+
*
|
|
654
|
+
* Set to `process.execArgv` to pass all arguments of the current process.
|
|
655
|
+
*
|
|
656
|
+
* Be careful when using, it as some options may crash worker, e.g. --prof, --title. See https://github.com/nodejs/node/issues/41103
|
|
657
|
+
*
|
|
658
|
+
* @default [] // no execution arguments are passed
|
|
659
|
+
*/
|
|
660
|
+
execArgv?: string[];
|
|
661
|
+
}
|
|
662
|
+
interface VmOptions {
|
|
663
|
+
/**
|
|
664
|
+
* Specifies the memory limit for `worker_thread` or `child_process` before they are recycled.
|
|
665
|
+
* If you see memory leaks, try to tinker this value.
|
|
666
|
+
*/
|
|
667
|
+
memoryLimit?: string | number;
|
|
668
|
+
/** Isolation is always enabled */
|
|
669
|
+
isolate?: true;
|
|
670
|
+
/**
|
|
671
|
+
* Pass additional arguments to `node` process when spawning `worker_threads` or `child_process`.
|
|
672
|
+
*
|
|
673
|
+
* See [Command-line API | Node.js](https://nodejs.org/docs/latest/api/cli.html) for more information.
|
|
674
|
+
*
|
|
675
|
+
* Set to `process.execArgv` to pass all arguments of the current process.
|
|
676
|
+
*
|
|
677
|
+
* Be careful when using, it as some options may crash worker, e.g. --prof, --title. See https://github.com/nodejs/node/issues/41103
|
|
678
|
+
*
|
|
679
|
+
* @default [] // no execution arguments are passed
|
|
680
|
+
*/
|
|
681
|
+
execArgv?: string[];
|
|
682
|
+
}
|
|
683
|
+
|
|
608
684
|
type WorkspaceSpec = [project: WorkspaceProject, testFile: string];
|
|
609
|
-
type RunWithFiles = (files: WorkspaceSpec[], invalidates?: string[]) =>
|
|
685
|
+
type RunWithFiles = (files: WorkspaceSpec[], invalidates?: string[]) => Awaitable$1<void>;
|
|
610
686
|
interface ProcessPool {
|
|
687
|
+
name: string;
|
|
611
688
|
runTests: RunWithFiles;
|
|
612
|
-
close
|
|
689
|
+
close?: () => Awaitable$1<void>;
|
|
613
690
|
}
|
|
614
691
|
|
|
615
692
|
type Awaitable<T> = T | PromiseLike<T>;
|
|
@@ -689,7 +766,7 @@ declare class StateManager {
|
|
|
689
766
|
updateTasks(packs: TaskResultPack[]): void;
|
|
690
767
|
updateUserLog(log: UserConsoleLog): void;
|
|
691
768
|
getCountOfFailedTests(): number;
|
|
692
|
-
cancelFiles(files: string[], root: string): void;
|
|
769
|
+
cancelFiles(files: string[], root: string, projectName: string): void;
|
|
693
770
|
}
|
|
694
771
|
|
|
695
772
|
interface SuiteResultCache {
|
|
@@ -1046,15 +1123,6 @@ type BuiltinReporters = keyof typeof ReportersMap;
|
|
|
1046
1123
|
|
|
1047
1124
|
type ChaiConfig = Omit<Partial<typeof chai.config>, 'useProxy' | 'proxyExcludedKeys'>;
|
|
1048
1125
|
|
|
1049
|
-
// Type definitions for istanbul-lib-report 3.0
|
|
1050
|
-
// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs
|
|
1051
|
-
// Definitions by: Jason Cheatham <https://github.com/jason0x43>
|
|
1052
|
-
// Zacharias Björngren <https://github.com/zache>
|
|
1053
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
1054
|
-
// TypeScript Version: 2.4
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
1126
|
interface Node {
|
|
1059
1127
|
isRoot(): boolean;
|
|
1060
1128
|
visit(visitor: Visitor, state: any): void;
|
|
@@ -1068,15 +1136,6 @@ interface Visitor<N extends Node = Node> {
|
|
|
1068
1136
|
onEnd(root: N, state: any): void;
|
|
1069
1137
|
}
|
|
1070
1138
|
|
|
1071
|
-
// Type definitions for istanbul-reports 3.0
|
|
1072
|
-
// Project: https://github.com/istanbuljs/istanbuljs, https://istanbul.js.org
|
|
1073
|
-
// Definitions by: Jason Cheatham <https://github.com/jason0x43>
|
|
1074
|
-
// Elena Shcherbakova <https://github.com/not-a-doctor>
|
|
1075
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
1076
|
-
// TypeScript Version: 2.4
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
1139
|
interface FileOptions {
|
|
1081
1140
|
file: string;
|
|
1082
1141
|
}
|
|
@@ -1088,17 +1147,17 @@ interface ProjectOptions {
|
|
|
1088
1147
|
interface ReportOptions {
|
|
1089
1148
|
clover: CloverOptions;
|
|
1090
1149
|
cobertura: CoberturaOptions;
|
|
1091
|
-
|
|
1150
|
+
"html-spa": HtmlSpaOptions;
|
|
1092
1151
|
html: HtmlOptions;
|
|
1093
1152
|
json: JsonOptions;
|
|
1094
|
-
|
|
1153
|
+
"json-summary": JsonSummaryOptions;
|
|
1095
1154
|
lcov: LcovOptions;
|
|
1096
1155
|
lcovonly: LcovOnlyOptions;
|
|
1097
1156
|
none: never;
|
|
1098
1157
|
teamcity: TeamcityOptions;
|
|
1099
1158
|
text: TextOptions;
|
|
1100
|
-
|
|
1101
|
-
|
|
1159
|
+
"text-lcov": TextLcovOptions;
|
|
1160
|
+
"text-summary": TextSummaryOptions;
|
|
1102
1161
|
}
|
|
1103
1162
|
|
|
1104
1163
|
interface CloverOptions extends FileOptions, ProjectOptions {}
|
|
@@ -1106,7 +1165,7 @@ interface CloverOptions extends FileOptions, ProjectOptions {}
|
|
|
1106
1165
|
interface CoberturaOptions extends FileOptions, ProjectOptions {}
|
|
1107
1166
|
|
|
1108
1167
|
interface HtmlSpaOptions extends HtmlOptions {
|
|
1109
|
-
metricsToShow: Array<
|
|
1168
|
+
metricsToShow: Array<"lines" | "branches" | "functions" | "statements">;
|
|
1110
1169
|
}
|
|
1111
1170
|
interface HtmlOptions {
|
|
1112
1171
|
verbose: boolean;
|
|
@@ -1175,9 +1234,9 @@ interface RuntimeRPC {
|
|
|
1175
1234
|
onPathsCollected: (paths: string[]) => void;
|
|
1176
1235
|
onUserConsoleLog: (log: UserConsoleLog) => void;
|
|
1177
1236
|
onUnhandledError: (err: unknown, type: string) => void;
|
|
1178
|
-
onCollected: (files: File[]) => void
|
|
1237
|
+
onCollected: (files: File[]) => Promise<void>;
|
|
1179
1238
|
onAfterSuiteRun: (meta: AfterSuiteRunMeta) => void;
|
|
1180
|
-
onTaskUpdate: (pack: TaskResultPack[]) => void
|
|
1239
|
+
onTaskUpdate: (pack: TaskResultPack[]) => Promise<void>;
|
|
1181
1240
|
onCancel: (reason: CancelReason) => void;
|
|
1182
1241
|
getCountOfFailedTests: () => number;
|
|
1183
1242
|
snapshotSaved: (snapshot: SnapshotResult) => void;
|
|
@@ -1298,14 +1357,14 @@ interface BaseCoverageOptions {
|
|
|
1298
1357
|
*/
|
|
1299
1358
|
include?: string[];
|
|
1300
1359
|
/**
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1360
|
+
* Extensions for files to be included in coverage
|
|
1361
|
+
*
|
|
1362
|
+
* @default ['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue', '.svelte', '.marko']
|
|
1363
|
+
*/
|
|
1305
1364
|
extension?: string | string[];
|
|
1306
1365
|
/**
|
|
1307
|
-
|
|
1308
|
-
|
|
1366
|
+
* List of files excluded from coverage as glob patterns
|
|
1367
|
+
*/
|
|
1309
1368
|
exclude?: string[];
|
|
1310
1369
|
/**
|
|
1311
1370
|
* Whether to include all files, including the untested ones into report
|
|
@@ -1343,36 +1402,29 @@ interface BaseCoverageOptions {
|
|
|
1343
1402
|
*/
|
|
1344
1403
|
skipFull?: boolean;
|
|
1345
1404
|
/**
|
|
1346
|
-
*
|
|
1347
|
-
* See `lines`, `functions`, `branches` and `statements` for the actual thresholds.
|
|
1348
|
-
*
|
|
1349
|
-
* @default false
|
|
1350
|
-
*/
|
|
1351
|
-
perFile?: boolean;
|
|
1352
|
-
/**
|
|
1353
|
-
* Threshold for lines
|
|
1354
|
-
*
|
|
1355
|
-
* @default undefined
|
|
1356
|
-
*/
|
|
1357
|
-
lines?: number;
|
|
1358
|
-
/**
|
|
1359
|
-
* Threshold for functions
|
|
1360
|
-
*
|
|
1361
|
-
* @default undefined
|
|
1362
|
-
*/
|
|
1363
|
-
functions?: number;
|
|
1364
|
-
/**
|
|
1365
|
-
* Threshold for branches
|
|
1405
|
+
* Configurations for thresholds
|
|
1366
1406
|
*
|
|
1367
|
-
* @
|
|
1368
|
-
*/
|
|
1369
|
-
branches?: number;
|
|
1370
|
-
/**
|
|
1371
|
-
* Threshold for statements
|
|
1407
|
+
* @example
|
|
1372
1408
|
*
|
|
1373
|
-
*
|
|
1374
|
-
|
|
1375
|
-
|
|
1409
|
+
* ```ts
|
|
1410
|
+
* {
|
|
1411
|
+
* // Thresholds for all files
|
|
1412
|
+
* functions: 95,
|
|
1413
|
+
* branches: 70,
|
|
1414
|
+
* perFile: true,
|
|
1415
|
+
* autoUpdate: true,
|
|
1416
|
+
*
|
|
1417
|
+
* // Thresholds for utilities
|
|
1418
|
+
* 'src/utils/**.ts': {
|
|
1419
|
+
* lines: 100,
|
|
1420
|
+
* statements: 95,
|
|
1421
|
+
* }
|
|
1422
|
+
* }
|
|
1423
|
+
* ```
|
|
1424
|
+
*/
|
|
1425
|
+
thresholds?: Thresholds | ({
|
|
1426
|
+
[glob: string]: Pick<Thresholds, 'statements' | 'functions' | 'branches' | 'lines'>;
|
|
1427
|
+
} & Thresholds);
|
|
1376
1428
|
/**
|
|
1377
1429
|
* Watermarks for statements, lines, branches and functions.
|
|
1378
1430
|
*
|
|
@@ -1384,12 +1436,6 @@ interface BaseCoverageOptions {
|
|
|
1384
1436
|
branches?: [number, number];
|
|
1385
1437
|
lines?: [number, number];
|
|
1386
1438
|
};
|
|
1387
|
-
/**
|
|
1388
|
-
* Update threshold values automatically when current coverage is higher than earlier thresholds
|
|
1389
|
-
*
|
|
1390
|
-
* @default false
|
|
1391
|
-
*/
|
|
1392
|
-
thresholdAutoUpdate?: boolean;
|
|
1393
1439
|
/**
|
|
1394
1440
|
* Generate coverage report even when tests fail.
|
|
1395
1441
|
*
|
|
@@ -1402,12 +1448,6 @@ interface BaseCoverageOptions {
|
|
|
1402
1448
|
* @default false
|
|
1403
1449
|
*/
|
|
1404
1450
|
allowExternal?: boolean;
|
|
1405
|
-
/**
|
|
1406
|
-
* Shortcut for `{ lines: 100, functions: 100, branches: 100, statements: 100 }`
|
|
1407
|
-
*
|
|
1408
|
-
* @default false
|
|
1409
|
-
*/
|
|
1410
|
-
100?: boolean;
|
|
1411
1451
|
}
|
|
1412
1452
|
interface CoverageIstanbulOptions extends BaseCoverageOptions {
|
|
1413
1453
|
/**
|
|
@@ -1423,6 +1463,26 @@ interface CustomProviderOptions extends Pick<BaseCoverageOptions, FieldsWithDefa
|
|
|
1423
1463
|
/** Name of the module or path to a file to load the custom provider from */
|
|
1424
1464
|
customProviderModule: string;
|
|
1425
1465
|
}
|
|
1466
|
+
interface Thresholds {
|
|
1467
|
+
/** Set global thresholds to `100` */
|
|
1468
|
+
100?: boolean;
|
|
1469
|
+
/** Check thresholds per file. */
|
|
1470
|
+
perFile?: boolean;
|
|
1471
|
+
/**
|
|
1472
|
+
* Update threshold values automatically when current coverage is higher than earlier thresholds
|
|
1473
|
+
*
|
|
1474
|
+
* @default false
|
|
1475
|
+
*/
|
|
1476
|
+
autoUpdate?: boolean;
|
|
1477
|
+
/** Thresholds for statements */
|
|
1478
|
+
statements?: number;
|
|
1479
|
+
/** Thresholds for functions */
|
|
1480
|
+
functions?: number;
|
|
1481
|
+
/** Thresholds for branches */
|
|
1482
|
+
branches?: number;
|
|
1483
|
+
/** Thresholds for lines */
|
|
1484
|
+
lines?: number;
|
|
1485
|
+
}
|
|
1426
1486
|
|
|
1427
1487
|
interface JSDOMOptions {
|
|
1428
1488
|
/**
|
|
@@ -1577,104 +1637,6 @@ type BenchmarkAPI = ChainableFunction<'skip' | 'only' | 'todo', [
|
|
|
1577
1637
|
runIf(condition: any): BenchmarkAPI;
|
|
1578
1638
|
};
|
|
1579
1639
|
|
|
1580
|
-
type Pool = 'browser' | 'threads' | 'forks' | 'vmThreads' | 'typescript';
|
|
1581
|
-
interface PoolOptions {
|
|
1582
|
-
/**
|
|
1583
|
-
* Run tests in `node:worker_threads`.
|
|
1584
|
-
*
|
|
1585
|
-
* Test isolation (when enabled) is done by spawning a new thread for each test file.
|
|
1586
|
-
*
|
|
1587
|
-
* This pool is used by default.
|
|
1588
|
-
*/
|
|
1589
|
-
threads?: ThreadsOptions & WorkerContextOptions;
|
|
1590
|
-
/**
|
|
1591
|
-
* Run tests in `node:child_process` using [`fork()`](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options)
|
|
1592
|
-
*
|
|
1593
|
-
* Test isolation (when enabled) is done by spawning a new child process for each test file.
|
|
1594
|
-
*/
|
|
1595
|
-
forks?: ForksOptions & WorkerContextOptions;
|
|
1596
|
-
/**
|
|
1597
|
-
* Run tests in isolated `node:vm`.
|
|
1598
|
-
* Test files are run parallel using `node:worker_threads`.
|
|
1599
|
-
*
|
|
1600
|
-
* This makes tests run faster, but VM module is unstable. Your tests might leak memory.
|
|
1601
|
-
*/
|
|
1602
|
-
vmThreads?: ThreadsOptions & VmOptions;
|
|
1603
|
-
}
|
|
1604
|
-
interface ThreadsOptions {
|
|
1605
|
-
/** Minimum amount of threads to use */
|
|
1606
|
-
minThreads?: number;
|
|
1607
|
-
/** Maximum amount of threads to use */
|
|
1608
|
-
maxThreads?: number;
|
|
1609
|
-
/**
|
|
1610
|
-
* Run tests inside a single thread.
|
|
1611
|
-
*
|
|
1612
|
-
* @default false
|
|
1613
|
-
*/
|
|
1614
|
-
singleThread?: boolean;
|
|
1615
|
-
/**
|
|
1616
|
-
* Use Atomics to synchronize threads
|
|
1617
|
-
*
|
|
1618
|
-
* This can improve performance in some cases, but might cause segfault in older Node versions.
|
|
1619
|
-
*
|
|
1620
|
-
* @default false
|
|
1621
|
-
*/
|
|
1622
|
-
useAtomics?: boolean;
|
|
1623
|
-
}
|
|
1624
|
-
interface ForksOptions {
|
|
1625
|
-
/** Minimum amount of child processes to use */
|
|
1626
|
-
minForks?: number;
|
|
1627
|
-
/** Maximum amount of child processes to use */
|
|
1628
|
-
maxForks?: number;
|
|
1629
|
-
/**
|
|
1630
|
-
* Run tests inside a single fork.
|
|
1631
|
-
*
|
|
1632
|
-
* @default false
|
|
1633
|
-
*/
|
|
1634
|
-
singleFork?: boolean;
|
|
1635
|
-
}
|
|
1636
|
-
interface WorkerContextOptions {
|
|
1637
|
-
/**
|
|
1638
|
-
* Isolate test environment by recycling `worker_threads` or `child_process` after each test
|
|
1639
|
-
*
|
|
1640
|
-
* @default true
|
|
1641
|
-
*/
|
|
1642
|
-
isolate?: boolean;
|
|
1643
|
-
/**
|
|
1644
|
-
* Pass additional arguments to `node` process when spawning `worker_threads` or `child_process`.
|
|
1645
|
-
*
|
|
1646
|
-
* See [Command-line API | Node.js](https://nodejs.org/docs/latest/api/cli.html) for more information.
|
|
1647
|
-
*
|
|
1648
|
-
* Set to `process.execArgv` to pass all arguments of the current process.
|
|
1649
|
-
*
|
|
1650
|
-
* Be careful when using, it as some options may crash worker, e.g. --prof, --title. See https://github.com/nodejs/node/issues/41103
|
|
1651
|
-
*
|
|
1652
|
-
* @default [] // no execution arguments are passed
|
|
1653
|
-
*/
|
|
1654
|
-
execArgv?: string[];
|
|
1655
|
-
}
|
|
1656
|
-
interface VmOptions {
|
|
1657
|
-
/**
|
|
1658
|
-
* Specifies the memory limit for `worker_thread` or `child_process` before they are recycled.
|
|
1659
|
-
* If you see memory leaks, try to tinker this value.
|
|
1660
|
-
*/
|
|
1661
|
-
memoryLimit?: string | number;
|
|
1662
|
-
/** Isolation is always enabled */
|
|
1663
|
-
isolate?: true;
|
|
1664
|
-
/**
|
|
1665
|
-
* Pass additional arguments to `node` process when spawning `worker_threads` or `child_process`.
|
|
1666
|
-
*
|
|
1667
|
-
* See [Command-line API | Node.js](https://nodejs.org/docs/latest/api/cli.html) for more information.
|
|
1668
|
-
*
|
|
1669
|
-
* Set to `process.execArgv` to pass all arguments of the current process.
|
|
1670
|
-
*
|
|
1671
|
-
* Be careful when using, it as some options may crash worker, e.g. --prof, --title. See https://github.com/nodejs/node/issues/41103
|
|
1672
|
-
*
|
|
1673
|
-
* @default [] // no execution arguments are passed
|
|
1674
|
-
*/
|
|
1675
|
-
execArgv?: string[];
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
1640
|
type BuiltinEnvironment = 'node' | 'jsdom' | 'happy-dom' | 'edge-runtime';
|
|
1679
1641
|
type VitestEnvironment = BuiltinEnvironment | (string & Record<never, never>);
|
|
1680
1642
|
|
|
@@ -1842,7 +1804,7 @@ interface InlineConfig {
|
|
|
1842
1804
|
* Benchmark options.
|
|
1843
1805
|
*
|
|
1844
1806
|
* @default {}
|
|
1845
|
-
|
|
1807
|
+
*/
|
|
1846
1808
|
benchmark?: BenchmarkUserOptions;
|
|
1847
1809
|
/**
|
|
1848
1810
|
* Include globs for test files
|
|
@@ -1877,10 +1839,10 @@ interface InlineConfig {
|
|
|
1877
1839
|
*/
|
|
1878
1840
|
dir?: string;
|
|
1879
1841
|
/**
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1842
|
+
* Register apis globally
|
|
1843
|
+
*
|
|
1844
|
+
* @default false
|
|
1845
|
+
*/
|
|
1884
1846
|
globals?: boolean;
|
|
1885
1847
|
/**
|
|
1886
1848
|
* Running environment
|
|
@@ -2059,7 +2021,7 @@ interface InlineConfig {
|
|
|
2059
2021
|
api?: boolean | number | ApiConfig;
|
|
2060
2022
|
/**
|
|
2061
2023
|
* Enable Vitest UI
|
|
2062
|
-
* @internal
|
|
2024
|
+
* @internal
|
|
2063
2025
|
*/
|
|
2064
2026
|
ui?: boolean;
|
|
2065
2027
|
/**
|
|
@@ -2178,7 +2140,7 @@ interface InlineConfig {
|
|
|
2178
2140
|
* The number of milliseconds after which a test is considered slow and reported as such in the results.
|
|
2179
2141
|
*
|
|
2180
2142
|
* @default 300
|
|
2181
|
-
|
|
2143
|
+
*/
|
|
2182
2144
|
slowTestThreshold?: number;
|
|
2183
2145
|
/**
|
|
2184
2146
|
* Path to a custom test runner.
|
|
@@ -2201,7 +2163,7 @@ interface InlineConfig {
|
|
|
2201
2163
|
/**
|
|
2202
2164
|
* Modify default Chai config. Vitest uses Chai for `expect` and `assert` matches.
|
|
2203
2165
|
* https://github.com/chaijs/chai/blob/4.x.x/lib/chai/config.js
|
|
2204
|
-
|
|
2166
|
+
*/
|
|
2205
2167
|
chaiConfig?: ChaiConfig;
|
|
2206
2168
|
/**
|
|
2207
2169
|
* Stop test execution when given number of tests have failed.
|
|
@@ -2211,7 +2173,7 @@ interface InlineConfig {
|
|
|
2211
2173
|
* Retry the test specific number of times if it fails.
|
|
2212
2174
|
*
|
|
2213
2175
|
* @default 0
|
|
2214
|
-
|
|
2176
|
+
*/
|
|
2215
2177
|
retry?: number;
|
|
2216
2178
|
/**
|
|
2217
2179
|
* Show full diff when snapshot fails instead of a patch.
|
|
@@ -2331,6 +2293,7 @@ type ProjectConfig = Omit<UserConfig, 'sequencer' | 'shard' | 'watch' | 'run' |
|
|
|
2331
2293
|
};
|
|
2332
2294
|
type RuntimeConfig = Pick<UserConfig, 'allowOnly' | 'testTimeout' | 'hookTimeout' | 'clearMocks' | 'mockReset' | 'restoreMocks' | 'fakeTimers' | 'maxConcurrency'> & {
|
|
2333
2295
|
sequence?: {
|
|
2296
|
+
concurrent?: boolean;
|
|
2334
2297
|
hooks?: SequenceHooks;
|
|
2335
2298
|
};
|
|
2336
2299
|
};
|
|
@@ -2427,4 +2390,4 @@ type Context = RootAndTarget & {
|
|
|
2427
2390
|
lastActivePath?: string;
|
|
2428
2391
|
};
|
|
2429
2392
|
|
|
2430
|
-
export { type
|
|
2393
|
+
export { type WorkerContext as $, type AfterSuiteRunMeta as A, type BaseCoverageOptions as B, type CoverageV8Options as C, type BuiltinEnvironment as D, type Environment as E, type FakeTimerInstallOpts as F, type VitestEnvironment as G, type HappyDOMOptions as H, type CSSModuleScopeStrategy as I, type JSDOMOptions as J, type ApiConfig as K, type EnvironmentOptions as L, type MockFactoryWithHelper as M, type DepsOptimizationOptions as N, type TransformModePatterns as O, type ProjectConfig as P, type InlineConfig as Q, type ResolvedConfig as R, type TypecheckConfig as S, type TestSequencer as T, type UserConfig as U, type VitestRunMode as V, WorkspaceProject as W, type RunnerRPC as X, type ContextTestEnvironment as Y, type ResolvedTestEnvironment as Z, type ContextRPC as _, type ResolvedCoverageOptions as a, type ResolveIdFunction as a0, type WorkerRPC as a1, type WorkerGlobalState as a2, type Awaitable as a3, type Nullable as a4, type Arrayable as a5, type ArgumentsType$1 as a6, type MutableArray as a7, type Constructable as a8, type ModuleCache as a9, type BuiltinReporters as aA, BenchmarkReportsMap as aB, type BenchmarkBuiltinReporters as aC, type EnvironmentReturn as aa, type VmEnvironmentReturn as ab, type OnServerRestartHandler as ac, type ReportContext as ad, type CoverageReporter as ae, type CoverageIstanbulOptions as af, type CustomProviderOptions as ag, type BenchmarkUserOptions as ah, type Benchmark as ai, type BenchmarkResult as aj, type BenchFunction as ak, type BenchmarkAPI as al, type PendingSuiteMock as am, type MockFactory as an, type MockMap as ao, DefaultReporter as ap, BasicReporter as aq, DotReporter as ar, JsonReporter$1 as as, VerboseReporter as at, TapReporter as au, JUnitReporter as av, TapFlatReporter as aw, HangingProcessReporter as ax, BaseReporter as ay, ReportersMap as az, type CoverageOptions as b, type CoverageProvider as c, type CoverageProviderModule as d, Vitest as e, type ProvidedContext as f, type RuntimeRPC as g, type WorkspaceSpec as h, type ProcessPool as i, type TestSequencerConstructor as j, type BrowserProviderInitializationOptions as k, type BrowserProvider as l, type BrowserProviderOptions as m, type RuntimeConfig as n, type UserConsoleLog as o, type ModuleGraphData as p, type Reporter as q, type RawErrsMap as r, startVitest as s, type TscErrorInfo as t, type CollectLineNumbers as u, type CollectLines as v, type RootAndTarget as w, type Context as x, type Pool as y, type PoolOptions as z };
|