vitest 1.6.0 → 2.0.0-beta.10
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 +173 -1
- package/dist/browser.d.ts +22 -2
- package/dist/browser.js +6 -4
- package/dist/chunks/{environments-node.vcoXCoKs.js → environments-node.39w4gmlF.js} +2 -2
- package/dist/chunks/{install-pkg.LE8oaA1t.js → install-pkg.DNUmWFkO.js} +2 -2
- package/dist/chunks/integrations-globals.C6Ah-pUW.js +31 -0
- package/dist/chunks/{runtime-console.EO5ha7qv.js → runtime-console.DiVMr5d4.js} +62 -32
- package/dist/chunks/{runtime-runBaseTests.oAvMKtQC.js → runtime-runBaseTests.Cukyr5-I.js} +18 -18
- package/dist/cli.js +3 -3
- package/dist/config.cjs +4 -5
- package/dist/config.d.ts +2 -2
- package/dist/config.js +4 -5
- package/dist/coverage.d.ts +1 -1
- package/dist/coverage.js +34 -8
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +3 -2
- package/dist/execute.js +2 -2
- package/dist/index.d.ts +777 -65
- package/dist/index.js +12 -12
- package/dist/node.d.ts +7 -7
- package/dist/node.js +24 -23
- package/dist/{reporters-yx5ZTtEV.d.ts → reporters-CYVC6LOl.d.ts} +439 -219
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +11 -12
- package/dist/runners.d.ts +4 -2
- package/dist/runners.js +25 -18
- package/dist/snapshot.js +3 -3
- package/dist/{suite-IbNSsUWN.d.ts → suite-Dpu9EC_k.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +4 -4
- package/dist/vendor/{base.Ybri3C14.js → base.Dln9yllP.js} +3 -3
- package/dist/vendor/{base.5NT-gWu5.js → base._gnK9Slw.js} +1 -2
- package/dist/vendor/{benchmark.yGkUTKnC.js → benchmark.BNLebNi5.js} +1 -1
- package/dist/vendor/{cac.EdDItJD-.js → cac.CtYFkoSJ.js} +66 -25
- package/dist/vendor/{cli-api.E07AF1Yq.js → cli-api.CUtJc4r3.js} +11851 -7276
- package/dist/vendor/{constants.5J7I254_.js → constants.TCjCaw2D.js} +4 -3
- package/dist/vendor/{execute.fL3szUAI.js → execute.BHj6OMh4.js} +4 -4
- package/dist/vendor/{index.DpVgvm2P.js → index.B5SKBLvV.js} +5 -5
- package/dist/vendor/{index.Q04MCqDO.js → index.BOMEjpjj.js} +680 -160
- package/dist/vendor/{index.8bPxjt7g.js → index.BpSiYbpB.js} +5 -1
- package/dist/vendor/{index.xL8XjTLv.js → index.CThipSqB.js} +2538 -2525
- package/dist/vendor/{index.dI9lHwVn.js → index.D3hs2WiI.js} +8 -6
- package/dist/vendor/{index.SMVOaj7F.js → index._7XLd8Kd.js} +2 -2
- package/dist/vendor/{index.GVFv9dZ0.js → index.kpsSqFiz.js} +2 -1
- package/dist/vendor/{rpc.joBhAkyK.js → rpc.DRDE9Pu1.js} +2 -2
- package/dist/vendor/{run-once.Olz_Zkd8.js → run-once.DLomgGUH.js} +1 -1
- package/dist/vendor/{setup-common.8nJLd4ay.js → setup-common.DAu7t7mY.js} +2 -2
- package/dist/vendor/spy.Cf_4R5Oe.js +22 -0
- package/dist/vendor/{tasks.IknbGB2n.js → tasks.WC7M-K-v.js} +4 -1
- package/dist/vendor/{utils.dEtNIEgr.js → utils.YuQ3LT2a.js} +2 -2
- package/dist/vendor/{vi.YFlodzP_.js → vi.hATFzZbX.js} +124 -56
- package/dist/vendor/{vm.QEE48c0T.js → vm.Ow-X2mkS.js} +47 -59
- package/dist/worker.js +6 -6
- package/dist/workers/forks.js +5 -5
- package/dist/workers/runVmTests.js +17 -17
- package/dist/workers/threads.js +5 -5
- package/dist/workers/vmForks.js +8 -8
- package/dist/workers/vmThreads.js +8 -8
- package/dist/workers.d.ts +1 -1
- package/dist/workers.js +13 -13
- package/package.json +35 -35
- package/suppress-warnings.cjs +2 -1
- package/vitest.mjs +1 -1
- package/dist/chunks/integrations-globals.kw4co3rx.js +0 -31
- package/dist/cli-wrapper.js +0 -119
- /package/dist/chunks/{node-git.Hw101KjS.js → node-git.CCI8evVZ.js} +0 -0
- /package/dist/vendor/{_commonjsHelpers.jjO7Zipk.js → _commonjsHelpers.BFTU3MAI.js} +0 -0
- /package/dist/vendor/{coverage.E7sG1b3r.js → coverage.ChSqD-qS.js} +0 -0
- /package/dist/vendor/{date.Ns1pGd_X.js → date.BKM1wewY.js} +0 -0
- /package/dist/vendor/{env.AtSIuHFg.js → env.bmJgw1qP.js} +0 -0
- /package/dist/vendor/{global.CkGT_TMy.js → global.7bFbnyXl.js} +0 -0
- /package/dist/vendor/{inspector.IgLX3ur5.js → inspector.hPQncR7V.js} +0 -0
- /package/dist/vendor/{utils.0uYuCbzo.js → utils.CUjzkRH7.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
2
|
-
export { b as bench } from './vendor/benchmark.
|
|
3
|
-
export { i as isFirstRun, a as runOnce } from './vendor/run-once.
|
|
4
|
-
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor/vi.
|
|
5
|
-
import { d as dist } from './vendor/index.
|
|
6
|
-
export { b as assertType, g as getRunningMode, i as inject, a as isWatchMode } from './vendor/index.
|
|
2
|
+
export { b as bench } from './vendor/benchmark.BNLebNi5.js';
|
|
3
|
+
export { i as isFirstRun, a as runOnce } from './vendor/run-once.DLomgGUH.js';
|
|
4
|
+
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor/vi.hATFzZbX.js';
|
|
5
|
+
import { d as dist } from './vendor/index.D3hs2WiI.js';
|
|
6
|
+
export { b as assertType, g as getRunningMode, i as inject, a as isWatchMode } from './vendor/index.D3hs2WiI.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/index.
|
|
12
|
+
import './vendor/index._7XLd8Kd.js';
|
|
13
13
|
import 'pathe';
|
|
14
|
-
import './vendor/global.
|
|
15
|
-
import './vendor/env.
|
|
14
|
+
import './vendor/global.7bFbnyXl.js';
|
|
15
|
+
import './vendor/env.bmJgw1qP.js';
|
|
16
16
|
import 'std-env';
|
|
17
|
-
import './vendor/_commonjsHelpers.
|
|
17
|
+
import './vendor/_commonjsHelpers.BFTU3MAI.js';
|
|
18
18
|
import '@vitest/expect';
|
|
19
19
|
import '@vitest/snapshot';
|
|
20
20
|
import '@vitest/utils/error';
|
|
21
|
-
import './vendor/tasks.
|
|
21
|
+
import './vendor/tasks.WC7M-K-v.js';
|
|
22
22
|
import '@vitest/utils/source-map';
|
|
23
|
-
import './vendor/base.
|
|
24
|
-
import './vendor/date.
|
|
23
|
+
import './vendor/base._gnK9Slw.js';
|
|
24
|
+
import './vendor/date.BKM1wewY.js';
|
|
25
25
|
import '@vitest/spy';
|
|
26
26
|
|
|
27
27
|
|
package/dist/node.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { s as VitestRunMode, U as UserConfig, ap as VitestOptions, L as Vitest, R as ResolvedConfig, P as ProvidedContext, aq as WorkspaceProject, e as RuntimeRPC, ar as TestSequencer, as as WorkspaceSpec } from './reporters-CYVC6LOl.js';
|
|
2
|
+
export { aA as BrowserCommand, aB as BrowserCommandContext, ay as BrowserProvider, ax as BrowserProviderInitializationOptions, az as BrowserProviderOptions, w as BrowserScript, aE as HTMLOptions, aD as JUnitOptions, aC as JsonOptions, at as ProcessPool, aw as TestSequencerConstructor, av as VitestPackageInstaller, au as getFilePoolName } from './reporters-CYVC6LOl.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
|
+
export { isFileServingAllowed } from 'vite';
|
|
4
5
|
import { Writable } from 'node:stream';
|
|
5
6
|
import '@vitest/runner';
|
|
6
7
|
import 'vite-node';
|
|
@@ -25,10 +26,6 @@ interface CliOptions extends UserConfig {
|
|
|
25
26
|
* Override the watch mode
|
|
26
27
|
*/
|
|
27
28
|
run?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Retry the test suite if it crashes due to a segfault (default: true)
|
|
30
|
-
*/
|
|
31
|
-
segfaultRetry?: number;
|
|
32
29
|
/**
|
|
33
30
|
* Removes colors from the console output
|
|
34
31
|
*/
|
|
@@ -58,6 +55,9 @@ interface GlobalSetupContext {
|
|
|
58
55
|
|
|
59
56
|
declare function createMethodsRPC(project: WorkspaceProject): RuntimeRPC;
|
|
60
57
|
|
|
58
|
+
declare const rootDir: string;
|
|
59
|
+
declare const distDir: string;
|
|
60
|
+
|
|
61
61
|
declare class BaseSequencer implements TestSequencer {
|
|
62
62
|
protected ctx: Vitest;
|
|
63
63
|
constructor(ctx: Vitest);
|
|
@@ -65,4 +65,4 @@ declare class BaseSequencer implements TestSequencer {
|
|
|
65
65
|
sort(files: WorkspaceSpec[]): Promise<WorkspaceSpec[]>;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export { BaseSequencer, type GlobalSetupContext, TestSequencer, Vitest, VitestPlugin, WorkspaceProject, WorkspaceSpec, createMethodsRPC, createVitest, parseCLI, registerConsoleShortcuts, startVitest };
|
|
68
|
+
export { BaseSequencer, type GlobalSetupContext, TestSequencer, Vitest, VitestPlugin, WorkspaceProject, WorkspaceSpec, createMethodsRPC, createVitest, distDir, parseCLI, registerConsoleShortcuts, rootDir, startVitest };
|
package/dist/node.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
export { b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/cli-api.
|
|
2
|
-
export { p as parseCLI } from './vendor/cac.
|
|
3
|
-
export {
|
|
1
|
+
export { b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, g as getFilePoolName, r as registerConsoleShortcuts, s as startVitest } from './vendor/cli-api.CUtJc4r3.js';
|
|
2
|
+
export { p as parseCLI } from './vendor/cac.CtYFkoSJ.js';
|
|
3
|
+
export { distDir, rootDir } from './path.js';
|
|
4
|
+
export { B as BaseSequencer } from './vendor/index.BOMEjpjj.js';
|
|
5
|
+
export { isFileServingAllowed } from 'vite';
|
|
4
6
|
import 'pathe';
|
|
5
|
-
import './vendor/constants.
|
|
6
|
-
import './vendor/coverage.
|
|
7
|
-
import './vendor/index.
|
|
7
|
+
import './vendor/constants.TCjCaw2D.js';
|
|
8
|
+
import './vendor/coverage.ChSqD-qS.js';
|
|
9
|
+
import './vendor/index.kpsSqFiz.js';
|
|
8
10
|
import 'node:console';
|
|
9
|
-
import 'vite';
|
|
10
11
|
import 'node:path';
|
|
11
12
|
import 'node:url';
|
|
12
13
|
import 'node:process';
|
|
13
14
|
import 'node:fs';
|
|
14
15
|
import 'node:worker_threads';
|
|
15
|
-
import './vendor/_commonjsHelpers.
|
|
16
|
+
import './vendor/_commonjsHelpers.BFTU3MAI.js';
|
|
16
17
|
import 'os';
|
|
17
18
|
import 'path';
|
|
18
|
-
import './vendor/index.xL8XjTLv.js';
|
|
19
19
|
import 'util';
|
|
20
|
+
import './vendor/index.CThipSqB.js';
|
|
20
21
|
import 'stream';
|
|
21
22
|
import 'events';
|
|
22
23
|
import 'fs';
|
|
@@ -25,12 +26,11 @@ import 'vite-node/client';
|
|
|
25
26
|
import '@vitest/snapshot/manager';
|
|
26
27
|
import 'vite-node/server';
|
|
27
28
|
import '@vitest/runner/utils';
|
|
28
|
-
import './vendor/base.
|
|
29
|
+
import './vendor/base._gnK9Slw.js';
|
|
29
30
|
import '@vitest/utils';
|
|
30
|
-
import './vendor/env.
|
|
31
|
+
import './vendor/env.bmJgw1qP.js';
|
|
31
32
|
import 'std-env';
|
|
32
|
-
import './
|
|
33
|
-
import './vendor/index.8bPxjt7g.js';
|
|
33
|
+
import './vendor/index.BpSiYbpB.js';
|
|
34
34
|
import 'zlib';
|
|
35
35
|
import 'buffer';
|
|
36
36
|
import 'crypto';
|
|
@@ -46,23 +46,24 @@ import 'node:events';
|
|
|
46
46
|
import 'tinypool';
|
|
47
47
|
import 'node:crypto';
|
|
48
48
|
import 'node:fs/promises';
|
|
49
|
-
import '
|
|
49
|
+
import 'debug';
|
|
50
|
+
import 'node:module';
|
|
51
|
+
import 'node:assert';
|
|
52
|
+
import 'node:util';
|
|
50
53
|
import 'vite-node/utils';
|
|
51
54
|
import 'magic-string';
|
|
52
|
-
import 'acorn-walk';
|
|
53
55
|
import '@vitest/utils/ast';
|
|
54
|
-
import '
|
|
55
|
-
import './vendor/
|
|
56
|
-
import '
|
|
57
|
-
import './vendor/index.SMVOaj7F.js';
|
|
58
|
-
import './vendor/global.CkGT_TMy.js';
|
|
56
|
+
import '@ampproject/remapping';
|
|
57
|
+
import './vendor/index._7XLd8Kd.js';
|
|
58
|
+
import './vendor/global.7bFbnyXl.js';
|
|
59
59
|
import 'node:readline';
|
|
60
60
|
import 'readline';
|
|
61
|
-
import './vendor/
|
|
61
|
+
import './vendor/utils.YuQ3LT2a.js';
|
|
62
|
+
import './vendor/tasks.WC7M-K-v.js';
|
|
62
63
|
import 'node:perf_hooks';
|
|
63
|
-
import './chunks/runtime-console.
|
|
64
|
+
import './chunks/runtime-console.DiVMr5d4.js';
|
|
64
65
|
import 'node:stream';
|
|
65
|
-
import './vendor/date.
|
|
66
|
+
import './vendor/date.BKM1wewY.js';
|
|
66
67
|
import 'execa';
|
|
67
68
|
import 'module';
|
|
68
69
|
import 'assert';
|