vitest 1.0.0-beta.3 → 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 +3 -498
- package/dist/browser.d.ts +1 -2
- package/dist/browser.js +4 -4
- package/dist/child.js +15 -18
- package/dist/{chunk-api-setup.37a43981.js → chunks/api-setup.jHV5vgr2.js} +101 -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 +21 -23
- package/dist/config.cjs +2 -1
- package/dist/config.d.ts +4 -7
- package/dist/config.js +2 -1
- package/dist/coverage.d.ts +25 -16
- 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 -2
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +2 -3
- package/dist/execute.js +3 -4
- package/dist/index.d.ts +396 -95
- package/dist/index.js +10 -10
- package/dist/node.d.ts +10 -6
- package/dist/node.js +17 -22
- package/dist/{vendor-paths.84fc7a99.js → paths.js} +1 -1
- package/dist/{reporters-1678fe04.d.ts → reporters-ANEBTnOh.d.ts} +336 -340
- package/dist/reporters.d.ts +1 -2
- package/dist/reporters.js +7 -8
- package/dist/runners.d.ts +1 -2
- package/dist/runners.js +8 -9
- package/dist/{suite-0579b50d.d.ts → suite-C1OmA61l.d.ts} +1 -1
- package/dist/suite.d.ts +2 -3
- package/dist/suite.js +3 -3
- package/dist/{vendor-benchmark.44931cfa.js → vendor/benchmark.WVm6DARl.js} +1 -1
- package/dist/{vendor-execute.e6e4e89b.js → vendor/execute.aMjV5C9u.js} +4 -7
- package/dist/vendor/global.L7JRz1qU.js +14 -0
- package/dist/{vendor-index.68ecee35.js → vendor/index.Npc-eff0.js} +11 -4
- package/dist/{vendor-index.29282562.js → vendor/index.XU72Rmy8.js} +1 -1
- package/dist/{vendor-index.3d079eea.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.327f8f1f.js → vendor/node.c-kzGvOB.js} +2192 -5614
- package/dist/{vendor-reporters.b9600369.js → vendor/reporters.1xKxm8im.js} +424 -374
- package/dist/{vendor-rpc.cbd8e972.js → vendor/rpc.Bl-ysZIr.js} +1 -1
- package/dist/{vendor-run-once.3e5ef7d7.js → vendor/run-once.X3E7xx3F.js} +1 -1
- package/dist/{vendor-vi.d30b47ae.js → vendor/vi.voNYQWB_.js} +35 -38
- package/dist/vm.js +16 -20
- package/dist/worker.js +16 -20
- package/index.cjs +5 -0
- package/package.json +50 -54
- package/dist/chunk-install-pkg.6349b322.js +0 -1740
- package/dist/chunk-integrations-globals.9df12d91.js +0 -29
- package/dist/vendor-global.97e4527c.js +0 -9
- 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-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
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
|
|
2
|
-
export { b as bench } from './vendor
|
|
3
|
-
export { i as isFirstRun, r as runOnce } from './vendor
|
|
4
|
-
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor
|
|
5
|
-
import { d as dist } from './vendor
|
|
6
|
-
export {
|
|
2
|
+
export { b as bench } from './vendor/benchmark.WVm6DARl.js';
|
|
3
|
+
export { i as isFirstRun, r as runOnce } from './vendor/run-once.X3E7xx3F.js';
|
|
4
|
+
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor/vi.voNYQWB_.js';
|
|
5
|
+
import { d as dist } from './vendor/index.Npc-eff0.js';
|
|
6
|
+
export { c as assertType, g as getRunningMode, a as inject, b as isWatchMode } from './vendor/index.Npc-eff0.js';
|
|
7
7
|
import * as chai from 'chai';
|
|
8
8
|
export { chai };
|
|
9
9
|
export { assert, should } from 'chai';
|
|
10
10
|
import '@vitest/runner/utils';
|
|
11
11
|
import '@vitest/utils';
|
|
12
|
-
import './vendor
|
|
12
|
+
import './vendor/index.XU72Rmy8.js';
|
|
13
13
|
import 'pathe';
|
|
14
14
|
import 'std-env';
|
|
15
|
-
import './vendor
|
|
16
|
-
import './vendor
|
|
15
|
+
import './vendor/global.L7JRz1qU.js';
|
|
16
|
+
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
17
17
|
import '@vitest/expect';
|
|
18
18
|
import '@vitest/snapshot';
|
|
19
19
|
import '@vitest/utils/error';
|
|
20
|
-
import './vendor
|
|
20
|
+
import './vendor/tasks.IknbGB2n.js';
|
|
21
21
|
import '@vitest/utils/source-map';
|
|
22
|
-
import './vendor
|
|
22
|
+
import './vendor/date.W90-E5kF.js';
|
|
23
23
|
import '@vitest/spy';
|
|
24
24
|
|
|
25
25
|
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VitestRunMode, U as UserConfig, e as Vitest, T as TestSequencer,
|
|
2
|
-
export {
|
|
1
|
+
import { V as VitestRunMode, U as UserConfig, e as Vitest, R as ResolvedConfig, f as ProvidedContext, W as WorkspaceProject, g as RuntimeRPC, T as TestSequencer, h as WorkspaceSpec } from './reporters-ANEBTnOh.js';
|
|
2
|
+
export { l as BrowserProvider, k as BrowserProviderInitializationOptions, m as BrowserProviderOptions, i as ProcessPool, j as TestSequencerConstructor, s as startVitest } from './reporters-ANEBTnOh.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import 'vite-node';
|
|
@@ -12,7 +12,6 @@ import 'vite-node/client';
|
|
|
12
12
|
import '@vitest/snapshot/manager';
|
|
13
13
|
import 'vite-node/server';
|
|
14
14
|
import 'node:worker_threads';
|
|
15
|
-
import 'rollup';
|
|
16
15
|
import 'node:fs';
|
|
17
16
|
import 'chai';
|
|
18
17
|
|
|
@@ -22,6 +21,13 @@ declare function VitestPlugin(options?: UserConfig, ctx?: Vitest): Promise<Plugi
|
|
|
22
21
|
|
|
23
22
|
declare function registerConsoleShortcuts(ctx: Vitest): () => void;
|
|
24
23
|
|
|
24
|
+
interface GlobalSetupContext {
|
|
25
|
+
config: ResolvedConfig;
|
|
26
|
+
provide<T extends keyof ProvidedContext>(key: T, value: ProvidedContext[T]): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare function createMethodsRPC(project: WorkspaceProject): RuntimeRPC;
|
|
30
|
+
|
|
25
31
|
declare class BaseSequencer implements TestSequencer {
|
|
26
32
|
protected ctx: Vitest;
|
|
27
33
|
constructor(ctx: Vitest);
|
|
@@ -29,6 +35,4 @@ declare class BaseSequencer implements TestSequencer {
|
|
|
29
35
|
sort(files: WorkspaceSpec[]): Promise<WorkspaceSpec[]>;
|
|
30
36
|
}
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export { BaseSequencer, TestSequencer, Vitest, VitestPlugin, WorkspaceSpec, createVitest, ensurePackageInstalled, registerConsoleShortcuts };
|
|
38
|
+
export { BaseSequencer, type GlobalSetupContext, TestSequencer, Vitest, VitestPlugin, WorkspaceProject, WorkspaceSpec, createMethodsRPC, createVitest, registerConsoleShortcuts };
|
package/dist/node.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin,
|
|
1
|
+
export { B as BaseSequencer, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/node.c-kzGvOB.js';
|
|
2
2
|
import 'pathe';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:process';
|
|
7
7
|
import 'node:fs';
|
|
8
|
-
import './vendor
|
|
9
|
-
import './vendor
|
|
8
|
+
import './vendor/constants.WSvnD_fn.js';
|
|
9
|
+
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
10
10
|
import 'os';
|
|
11
11
|
import 'path';
|
|
12
|
+
import './vendor/index.xL8XjTLv.js';
|
|
12
13
|
import 'util';
|
|
13
14
|
import 'stream';
|
|
14
15
|
import 'events';
|
|
@@ -18,44 +19,38 @@ import 'vite-node/utils';
|
|
|
18
19
|
import 'vite-node/client';
|
|
19
20
|
import '@vitest/snapshot/manager';
|
|
20
21
|
import 'vite-node/server';
|
|
21
|
-
import './vendor
|
|
22
|
+
import './vendor/index.XU72Rmy8.js';
|
|
22
23
|
import 'std-env';
|
|
23
24
|
import '@vitest/runner/utils';
|
|
24
25
|
import '@vitest/utils';
|
|
25
|
-
import './vendor
|
|
26
|
-
import './vendor
|
|
27
|
-
import './
|
|
26
|
+
import './vendor/global.L7JRz1qU.js';
|
|
27
|
+
import './vendor/coverage.v6aD8iAh.js';
|
|
28
|
+
import './paths.js';
|
|
28
29
|
import 'node:v8';
|
|
29
30
|
import 'node:os';
|
|
30
31
|
import 'node:events';
|
|
31
32
|
import 'tinypool';
|
|
32
|
-
import './vendor
|
|
33
|
-
import './vendor
|
|
33
|
+
import './vendor/index.cAUulNDf.js';
|
|
34
|
+
import './vendor/base._79unx2z.js';
|
|
34
35
|
import 'node:worker_threads';
|
|
35
36
|
import 'node:fs/promises';
|
|
36
37
|
import 'node:perf_hooks';
|
|
37
|
-
import '
|
|
38
|
-
import 'node:buffer';
|
|
39
|
-
import 'node:child_process';
|
|
40
|
-
import 'child_process';
|
|
41
|
-
import 'assert';
|
|
42
|
-
import 'buffer';
|
|
43
|
-
import 'node:util';
|
|
38
|
+
import 'execa';
|
|
44
39
|
import '@vitest/utils/source-map';
|
|
45
40
|
import 'local-pkg';
|
|
46
41
|
import 'module';
|
|
47
|
-
import 'acorn';
|
|
48
42
|
import 'acorn-walk';
|
|
49
|
-
import './vendor
|
|
50
|
-
import './
|
|
43
|
+
import './vendor/reporters.1xKxm8im.js';
|
|
44
|
+
import './chunks/runtime-console.iCAG0Yz3.js';
|
|
51
45
|
import 'node:stream';
|
|
52
46
|
import 'node:console';
|
|
53
|
-
import './vendor
|
|
54
|
-
import './vendor
|
|
47
|
+
import './vendor/date.W90-E5kF.js';
|
|
48
|
+
import './vendor/tasks.IknbGB2n.js';
|
|
55
49
|
import 'node:module';
|
|
56
50
|
import 'node:crypto';
|
|
51
|
+
import 'assert';
|
|
57
52
|
import 'magic-string';
|
|
58
53
|
import 'strip-literal';
|
|
59
|
-
import './vendor
|
|
54
|
+
import './vendor/environments.hpEVJZPC.js';
|
|
60
55
|
import 'node:readline';
|
|
61
56
|
import 'readline';
|