vitest 0.0.109 → 0.0.113
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/cli.js +8 -6
- package/dist/{constants-e762cbc5.js → constants-900abe4a.js} +1 -1
- package/dist/{diff-46ee5d7d.js → diff-9c43ab50.js} +3300 -3298
- package/dist/entry.js +91 -465
- package/dist/{global-e0d00047.js → global-75208c77.js} +8 -7
- package/dist/{utils-d97bd6d9.js → index-041e627e.js} +5 -186
- package/dist/{index-0961cf69.js → index-09437c50.js} +12 -5
- package/dist/index-1488b423.js +186 -0
- package/dist/{index-a727b58c.js → index-c3f2f9fe.js} +845 -1690
- package/dist/index.d.ts +192 -21
- package/dist/index.js +5 -6
- package/dist/{jest-mock-8498c46d.js → jest-mock-a57b745c.js} +1 -4
- package/dist/magic-string.es-94000aea.js +1360 -0
- package/dist/{middleware-093a3bde.js → middleware-0ebc5238.js} +2 -4
- package/dist/node.d.ts +63 -1
- package/dist/node.js +8 -6
- package/dist/utils.js +3 -2
- package/dist/vi-51946984.js +1018 -0
- package/dist/worker.js +145 -74
- package/package.json +6 -6
- package/dist/vi-9754296d.js +0 -557
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { A as API_PATH } from './constants-
|
|
1
|
+
import { A as API_PATH } from './constants-900abe4a.js';
|
|
2
2
|
import 'url';
|
|
3
|
-
import './
|
|
4
|
-
import 'tty';
|
|
5
|
-
import 'local-pkg';
|
|
3
|
+
import './index-1488b423.js';
|
|
6
4
|
import 'path';
|
|
7
5
|
|
|
8
6
|
/*! (c) 2020 Andrea Giammarchi */
|
package/dist/node.d.ts
CHANGED
|
@@ -1,7 +1,69 @@
|
|
|
1
1
|
import { ViteDevServer, UserConfig as UserConfig$1 } from 'vite';
|
|
2
2
|
import { OptionsReceived } from 'pretty-format';
|
|
3
3
|
|
|
4
|
+
declare abstract class BaseReporter implements Reporter {
|
|
5
|
+
ctx: Vitest;
|
|
6
|
+
start: number;
|
|
7
|
+
end: number;
|
|
8
|
+
watchFilters?: string[];
|
|
9
|
+
isTTY: boolean;
|
|
10
|
+
constructor(ctx: Vitest);
|
|
11
|
+
relative(path: string): string;
|
|
12
|
+
onFinished(files?: File[]): Promise<void>;
|
|
13
|
+
onTaskUpdate(pack: TaskResultPack): void;
|
|
14
|
+
isFirstWatchRun: boolean;
|
|
15
|
+
onWatcherStart(): Promise<void>;
|
|
16
|
+
onWatcherRerun(files: string[], trigger: string): Promise<void>;
|
|
17
|
+
onUserConsoleLog(log: UserConsoleLog): void;
|
|
18
|
+
onServerRestart(): void;
|
|
19
|
+
reportSummary(files: File[]): Promise<void>;
|
|
20
|
+
private printTaskErrors;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface ListRendererOptions {
|
|
24
|
+
renderSucceed?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const createListRenderer: (_tasks: Task[], options?: ListRendererOptions) => {
|
|
27
|
+
start(): any;
|
|
28
|
+
update(_tasks: Task[]): any;
|
|
29
|
+
stop(): Promise<any>;
|
|
30
|
+
clear(): void;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare class DefaultReporter extends BaseReporter {
|
|
34
|
+
renderer?: ReturnType<typeof createListRenderer>;
|
|
35
|
+
rendererOptions: ListRendererOptions;
|
|
36
|
+
onStart(): void;
|
|
37
|
+
onFinished(files?: File[]): Promise<void>;
|
|
38
|
+
onWatcherStart(): Promise<void>;
|
|
39
|
+
stopListRender(): Promise<void>;
|
|
40
|
+
onWatcherRerun(files: string[], trigger: string): Promise<void>;
|
|
41
|
+
onUserConsoleLog(log: UserConsoleLog): void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare class DotReporter extends BaseReporter {
|
|
45
|
+
renderer?: ReturnType<typeof createListRenderer>;
|
|
46
|
+
onStart(): void;
|
|
47
|
+
onFinished(files?: File[]): Promise<void>;
|
|
48
|
+
onWatcherStart(): Promise<void>;
|
|
49
|
+
stopListRender(): Promise<void>;
|
|
50
|
+
onWatcherRerun(files: string[], trigger: string): Promise<void>;
|
|
51
|
+
onUserConsoleLog(log: UserConsoleLog): void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare class VerboseReporter extends DefaultReporter {
|
|
55
|
+
constructor(ctx: Vitest);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare const ReportersMap: {
|
|
59
|
+
default: typeof DefaultReporter;
|
|
60
|
+
verbose: typeof VerboseReporter;
|
|
61
|
+
dot: typeof DotReporter;
|
|
62
|
+
};
|
|
63
|
+
declare type BuiltinReporters = keyof typeof ReportersMap;
|
|
64
|
+
|
|
4
65
|
declare type Awaitable<T> = T | PromiseLike<T>;
|
|
66
|
+
declare type Arrayable<T> = T | Array<T>;
|
|
5
67
|
declare type ArgumentsType<T> = T extends (...args: infer U) => any ? U : never;
|
|
6
68
|
interface UserConsoleLog {
|
|
7
69
|
content: string;
|
|
@@ -156,7 +218,7 @@ interface InlineConfig {
|
|
|
156
218
|
/**
|
|
157
219
|
* Custom reporter for output
|
|
158
220
|
*/
|
|
159
|
-
reporters?:
|
|
221
|
+
reporters?: Arrayable<BuiltinReporters | Reporter>;
|
|
160
222
|
/**
|
|
161
223
|
* Enable multi-threading
|
|
162
224
|
*
|
package/dist/node.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export { c as createVitest } from './index-
|
|
2
|
-
import './
|
|
3
|
-
import 'tty';
|
|
4
|
-
import 'local-pkg';
|
|
1
|
+
export { c as createVitest } from './index-c3f2f9fe.js';
|
|
2
|
+
import './index-1488b423.js';
|
|
5
3
|
import 'path';
|
|
6
4
|
import 'vite';
|
|
7
5
|
import 'process';
|
|
@@ -10,10 +8,14 @@ import 'os';
|
|
|
10
8
|
import 'util';
|
|
11
9
|
import 'stream';
|
|
12
10
|
import 'events';
|
|
13
|
-
import './
|
|
11
|
+
import './index-041e627e.js';
|
|
12
|
+
import 'tty';
|
|
13
|
+
import 'local-pkg';
|
|
14
|
+
import './constants-900abe4a.js';
|
|
14
15
|
import 'url';
|
|
16
|
+
import './magic-string.es-94000aea.js';
|
|
15
17
|
import 'perf_hooks';
|
|
16
|
-
import './diff-
|
|
18
|
+
import './diff-9c43ab50.js';
|
|
17
19
|
import './index-61c8686f.js';
|
|
18
20
|
import './_commonjsHelpers-c9e3b764.js';
|
|
19
21
|
import 'assert';
|
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { e as ensurePackageInstalled, g as
|
|
2
|
-
|
|
1
|
+
export { e as ensurePackageInstalled, g as getFullName, f as getNames, a as getSuites, k as getTasks, b as getTests, h as hasFailed, j as hasTests, i as interpretOnlyMode, m as mergeSlashes, n as noop, d as notNullish, p as partitionSuiteChildren, s as slash, t as toArray } from './index-041e627e.js';
|
|
2
|
+
export { a as resolvePath } from './index-1488b423.js';
|
|
3
3
|
import 'tty';
|
|
4
|
+
import 'local-pkg';
|
|
4
5
|
import 'path';
|