vitest 0.0.64 → 0.0.65
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/dist/chunk-3GMBTS5G.js +19 -0
- package/dist/chunk-LRXUKIDM.js +246 -0
- package/dist/chunk-NK2VTQLQ.js +81 -0
- package/dist/chunk-RNHB4AXG.js +128 -0
- package/dist/chunk-SF66BJ42.js +78 -0
- package/dist/chunk-VAUJEKEW.js +86 -0
- package/dist/global-OS2VOPCA.js +20 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +46 -1
- package/dist/node/cli.d.ts +1 -3
- package/dist/node/cli.js +2000 -19
- package/dist/{options-654578ef.d.ts → options-652352ad.d.ts} +43 -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 +260 -4
- package/package.json +17 -19
- 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';
|
|
@@ -247,4 +288,4 @@ interface ResolvedConfig extends Omit<Required<CliOptions>, 'config' | 'filters'
|
|
|
247
288
|
snapshotOptions: SnapshotStateOptions;
|
|
248
289
|
}
|
|
249
290
|
|
|
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 };
|
|
291
|
+
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-652352ad';
|
|
2
|
+
import 'vite';
|
|
3
3
|
import 'pretty-format';
|
|
4
4
|
|
|
5
5
|
declare function run(files: string[], config: ResolvedConfig): Promise<void>;
|