vitest 0.0.63 → 0.0.67
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 +2 -1
- package/dist/chunk-5TNYWP3O.js +81 -0
- package/dist/chunk-ANPMHBIF.js +253 -0
- package/dist/chunk-APGELTDH.js +19 -0
- package/dist/chunk-R2SMNEBL.js +95 -0
- package/dist/chunk-VLGIKNLC.js +78 -0
- package/dist/chunk-XUIDSY4V.js +35 -0
- package/dist/chunk-YPKHVZRP.js +86 -0
- package/dist/global-PRFYLY7P.js +22 -0
- package/dist/index.d.ts +6 -8
- package/dist/index.js +46 -1
- package/dist/node/cli.d.ts +0 -12
- package/dist/node/cli.js +2609 -19
- package/dist/{options-654578ef.d.ts → options-63a726fa.d.ts} +46 -2
- package/dist/runtime/entry.d.ts +2 -2
- package/dist/runtime/entry.js +2535 -9
- package/dist/runtime/worker.d.ts +1 -3
- package/dist/runtime/worker.js +264 -4
- package/package.json +23 -23
- package/dist/chunk-3P4SNPBT.js +0 -1
- package/dist/chunk-3VLG4URE.js +0 -1
- package/dist/chunk-CNY47EZT.js +0 -1
- package/dist/chunk-H3VLV7UP.js +0 -1
- package/dist/general-39d52683.d.ts +0 -43
- package/dist/global-E2TE3466.js +0 -1
|
@@ -1,6 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransformResult, ViteDevServer } from 'vite';
|
|
2
2
|
import { OptionsReceived } from 'pretty-format';
|
|
3
3
|
|
|
4
|
+
declare class StateManager {
|
|
5
|
+
filesMap: Record<string, File>;
|
|
6
|
+
idMap: Record<string, Task>;
|
|
7
|
+
taskFileMap: WeakMap<Task, File>;
|
|
8
|
+
getFiles(keys?: string[]): File[];
|
|
9
|
+
collectFiles(files: File[]): void;
|
|
10
|
+
updateId(task: Task): void;
|
|
11
|
+
updateTasks(packs: TaskResultPack[]): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class SnapshotManager {
|
|
15
|
+
config: ResolvedConfig;
|
|
16
|
+
summary: SnapshotSummary;
|
|
17
|
+
constructor(config: ResolvedConfig);
|
|
18
|
+
clear(): void;
|
|
19
|
+
add(result: SnapshotResult): void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare type Awaitable<T> = T | PromiseLike<T>;
|
|
23
|
+
declare type Nullable<T> = T | null | undefined;
|
|
24
|
+
declare type Arrayable<T> = T | Array<T>;
|
|
25
|
+
interface ModuleCache {
|
|
26
|
+
promise?: Promise<any>;
|
|
27
|
+
exports?: any;
|
|
28
|
+
transformResult?: TransformResult;
|
|
29
|
+
}
|
|
30
|
+
interface EnvironmentReturn {
|
|
31
|
+
teardown: (global: any) => Awaitable<void>;
|
|
32
|
+
}
|
|
33
|
+
interface Environment {
|
|
34
|
+
name: string;
|
|
35
|
+
setup(global: any): Awaitable<EnvironmentReturn>;
|
|
36
|
+
}
|
|
37
|
+
interface VitestContext {
|
|
38
|
+
config: ResolvedConfig;
|
|
39
|
+
server: ViteDevServer;
|
|
40
|
+
state: StateManager;
|
|
41
|
+
snapshot: SnapshotManager;
|
|
42
|
+
reporter: Reporter;
|
|
43
|
+
}
|
|
44
|
+
|
|
4
45
|
declare type RunMode = 'run' | 'skip' | 'only' | 'todo';
|
|
5
46
|
declare type TaskState = RunMode | 'pass' | 'fail';
|
|
6
47
|
declare type ComputeMode = 'serial' | 'concurrent';
|
|
@@ -222,6 +263,8 @@ interface UserOptions {
|
|
|
222
263
|
*/
|
|
223
264
|
minThreads?: number;
|
|
224
265
|
interpretDefault?: boolean;
|
|
266
|
+
testTimeout?: number;
|
|
267
|
+
hookTimeout?: number;
|
|
225
268
|
}
|
|
226
269
|
interface CliOptions extends UserOptions {
|
|
227
270
|
/**
|
|
@@ -238,6 +281,7 @@ interface CliOptions extends UserOptions {
|
|
|
238
281
|
* - `vite.config.ts`
|
|
239
282
|
*/
|
|
240
283
|
config?: string | undefined;
|
|
284
|
+
dom?: boolean;
|
|
241
285
|
}
|
|
242
286
|
interface ResolvedConfig extends Omit<Required<CliOptions>, 'config' | 'filters'> {
|
|
243
287
|
config?: string;
|
|
@@ -247,4 +291,4 @@ interface ResolvedConfig extends Omit<Required<CliOptions>, 'config' | 'filters'
|
|
|
247
291
|
snapshotOptions: SnapshotStateOptions;
|
|
248
292
|
}
|
|
249
293
|
|
|
250
|
-
export { CliOptions as C, File as F, GlobalContext as G, HookListener as H, ResolvedConfig as R, SnapshotResult as S, TaskResultPack as T, UserOptions as U, TestFactory as a, SuiteCollector as b, TestFunction as c, SuiteHooks as d, RunMode as e, TaskState as f, ComputeMode as g, TaskBase as h, TaskResult as i, Suite as j, Test as k, Task as l, TestCollector as m, Reporter as n, SnapshotData as o, SnapshotUpdateState as p, SnapshotStateOptions as q, SnapshotMatchOptions as r, UncheckedSnapshot as s, SnapshotSummary as t };
|
|
294
|
+
export { Awaitable as A, CliOptions as C, EnvironmentReturn as E, File as F, GlobalContext as G, HookListener as H, ModuleCache as M, Nullable as N, ResolvedConfig as R, SnapshotResult as S, TaskResultPack as T, UserOptions as U, VitestContext as V, TestFactory as a, SuiteCollector as b, TestFunction as c, SuiteHooks as d, RunMode as e, TaskState as f, ComputeMode as g, TaskBase as h, TaskResult as i, Suite as j, Test as k, Task as l, TestCollector as m, Reporter as n, SnapshotData as o, SnapshotUpdateState as p, SnapshotStateOptions as q, SnapshotMatchOptions as r, UncheckedSnapshot as s, SnapshotSummary as t, Arrayable as u, Environment as v };
|
package/dist/runtime/entry.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResolvedConfig } from '../options-
|
|
2
|
-
import '
|
|
1
|
+
import { R as ResolvedConfig } from '../options-63a726fa';
|
|
2
|
+
import 'vite';
|
|
3
3
|
import 'pretty-format';
|
|
4
4
|
|
|
5
5
|
declare function run(files: string[], config: ResolvedConfig): Promise<void>;
|