vitest 1.5.2 → 1.6.0
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/browser.d.ts +1 -1
- package/dist/browser.js +1 -1
- package/dist/chunks/environments-node.vcoXCoKs.js +19 -0
- package/dist/chunks/{integrations-globals.k0N5-dd1.js → integrations-globals.kw4co3rx.js} +7 -6
- package/dist/chunks/{runtime-console.kbFEN7E-.js → runtime-console.EO5ha7qv.js} +3 -3
- package/dist/chunks/{runtime-runBaseTests.-x-nNuJ_.js → runtime-runBaseTests.oAvMKtQC.js} +16 -16
- package/dist/cli.js +2 -2
- package/dist/config.cjs +3 -2
- package/dist/config.d.ts +1 -1
- package/dist/config.js +3 -2
- package/dist/coverage.d.ts +1 -1
- package/dist/environments.d.ts +1 -1
- package/dist/execute.d.ts +6 -4
- package/dist/execute.js +3 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +8 -7
- package/dist/node.d.ts +2 -2
- package/dist/node.js +12 -11
- package/dist/{reporters-xEmem8D4.d.ts → reporters-yx5ZTtEV.d.ts} +101 -26
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +11 -10
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +8 -7
- package/dist/snapshot.d.ts +9 -0
- package/dist/snapshot.js +8 -0
- package/dist/{suite-HPAKvIxA.d.ts → suite-IbNSsUWN.d.ts} +1 -1
- package/dist/suite.d.ts +3 -3
- package/dist/suite.js +5 -4
- package/dist/vendor/{base.Xt0Omgh7.js → base.5NT-gWu5.js} +9 -1
- package/dist/vendor/{base.gAwDs8Jc.js → base.Ybri3C14.js} +2 -2
- package/dist/vendor/{benchmark.eeqk2rd8.js → benchmark.yGkUTKnC.js} +1 -1
- package/dist/vendor/{cac.8mXc9Oj6.js → cac.EdDItJD-.js} +38 -15
- package/dist/vendor/{cli-api._n4_Wp_j.js → cli-api.E07AF1Yq.js} +155 -46
- package/dist/vendor/env.AtSIuHFg.js +7 -0
- package/dist/vendor/{execute.2_yoIC01.js → execute.fL3szUAI.js} +8 -3
- package/dist/vendor/{index.gHZzsRJQ.js → index.DpVgvm2P.js} +17 -18
- package/dist/vendor/{index.GlXSU9xI.js → index.Q04MCqDO.js} +690 -645
- package/dist/vendor/{index.ir9i0ywP.js → index.SMVOaj7F.js} +2 -6
- package/dist/vendor/{index.0RrMQKD8.js → index.dI9lHwVn.js} +2 -2
- package/dist/vendor/{setup-common.7SXMSI--.js → setup-common.8nJLd4ay.js} +1 -1
- package/dist/vendor/{utils.VYmeMh-u.js → utils.dEtNIEgr.js} +1 -1
- package/dist/vendor/{vi.Y_w82WR8.js → vi.YFlodzP_.js} +1 -1
- package/dist/vendor/{vm.I_IsyNig.js → vm.QEE48c0T.js} +135 -43
- package/dist/worker.js +8 -2
- package/dist/workers/forks.js +4 -4
- package/dist/workers/runVmTests.js +13 -10
- package/dist/workers/threads.js +4 -4
- package/dist/workers/vmForks.js +7 -7
- package/dist/workers/vmThreads.js +7 -7
- package/dist/workers.d.ts +1 -1
- package/dist/workers.js +8 -8
- package/package.json +13 -9
- package/snapshot.d.ts +1 -0
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-
|
|
2
|
+
import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-yx5ZTtEV.js';
|
|
3
3
|
import { VitestExecutor } from './execute.js';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import 'vite-node';
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.
|
|
2
|
+
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.8nJLd4ay.js';
|
|
3
3
|
export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor/coverage.E7sG1b3r.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import '@vitest/snapshot';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
2
|
+
import 'pathe';
|
|
3
|
+
import '@vitest/runner/utils';
|
|
4
|
+
import '@vitest/utils';
|
|
5
|
+
import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
|
|
6
|
+
import '../vendor/env.AtSIuHFg.js';
|
|
7
|
+
import 'std-env';
|
|
8
|
+
|
|
9
|
+
class VitestNodeSnapshotEnvironment extends NodeSnapshotEnvironment {
|
|
10
|
+
getHeader() {
|
|
11
|
+
return `// Vitest Snapshot v${this.getVersion()}, https://vitest.dev/guide/snapshot.html`;
|
|
12
|
+
}
|
|
13
|
+
resolvePath(filepath) {
|
|
14
|
+
const rpc = getWorkerState().rpc;
|
|
15
|
+
return rpc.resolveSnapshotPath(filepath);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { VitestNodeSnapshotEnvironment };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { g as globalApis } from '../vendor/constants.5J7I254_.js';
|
|
2
|
-
import { V as VitestIndex } from '../vendor/index.
|
|
2
|
+
import { V as VitestIndex } from '../vendor/index.dI9lHwVn.js';
|
|
3
3
|
import '@vitest/runner';
|
|
4
|
-
import '../vendor/benchmark.
|
|
4
|
+
import '../vendor/benchmark.yGkUTKnC.js';
|
|
5
5
|
import '@vitest/runner/utils';
|
|
6
6
|
import '@vitest/utils';
|
|
7
|
-
import '../vendor/index.
|
|
7
|
+
import '../vendor/index.SMVOaj7F.js';
|
|
8
8
|
import 'pathe';
|
|
9
|
-
import 'std-env';
|
|
10
9
|
import '../vendor/global.CkGT_TMy.js';
|
|
10
|
+
import '../vendor/env.AtSIuHFg.js';
|
|
11
|
+
import 'std-env';
|
|
11
12
|
import '../vendor/run-once.Olz_Zkd8.js';
|
|
12
|
-
import '../vendor/vi.
|
|
13
|
+
import '../vendor/vi.YFlodzP_.js';
|
|
13
14
|
import 'chai';
|
|
14
15
|
import '../vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
15
16
|
import '@vitest/expect';
|
|
@@ -17,7 +18,7 @@ import '@vitest/snapshot';
|
|
|
17
18
|
import '@vitest/utils/error';
|
|
18
19
|
import '../vendor/tasks.IknbGB2n.js';
|
|
19
20
|
import '@vitest/utils/source-map';
|
|
20
|
-
import '../vendor/base.
|
|
21
|
+
import '../vendor/base.5NT-gWu5.js';
|
|
21
22
|
import '../vendor/date.Ns1pGd_X.js';
|
|
22
23
|
import '@vitest/spy';
|
|
23
24
|
|
|
@@ -3,11 +3,11 @@ import { Console } from 'node:console';
|
|
|
3
3
|
import { relative } from 'node:path';
|
|
4
4
|
import { getSafeTimers, getColors } from '@vitest/utils';
|
|
5
5
|
import { R as RealDate } from '../vendor/date.Ns1pGd_X.js';
|
|
6
|
-
import '../vendor/index.ir9i0ywP.js';
|
|
7
|
-
import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
|
|
8
6
|
import 'pathe';
|
|
9
|
-
import 'std-env';
|
|
10
7
|
import '@vitest/runner/utils';
|
|
8
|
+
import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
|
|
9
|
+
import '../vendor/env.AtSIuHFg.js';
|
|
10
|
+
import 'std-env';
|
|
11
11
|
|
|
12
12
|
const UNKNOWN_TEST_ID = "__vitest__unknown_test__";
|
|
13
13
|
function getTaskIdByStack(root) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { startTests } from '@vitest/runner';
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
3
|
+
import 'pathe';
|
|
4
|
+
import '@vitest/runner/utils';
|
|
5
|
+
import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
|
|
6
|
+
import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
|
|
7
|
+
import '../vendor/env.AtSIuHFg.js';
|
|
8
|
+
import { a as globalExpect, r as resetModules, v as vi } from '../vendor/vi.YFlodzP_.js';
|
|
5
9
|
import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.E7sG1b3r.js';
|
|
6
|
-
import {
|
|
10
|
+
import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.DpVgvm2P.js';
|
|
7
11
|
import { createRequire } from 'node:module';
|
|
8
12
|
import util from 'node:util';
|
|
9
13
|
import timers from 'node:timers';
|
|
10
14
|
import { isatty } from 'node:tty';
|
|
11
15
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { s as setupCommonEnv } from '../vendor/setup-common.7SXMSI--.js';
|
|
15
|
-
import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
|
|
16
|
+
import { V as VitestIndex } from '../vendor/index.dI9lHwVn.js';
|
|
17
|
+
import { s as setupCommonEnv } from '../vendor/setup-common.8nJLd4ay.js';
|
|
16
18
|
import { c as closeInspector } from '../vendor/inspector.IgLX3ur5.js';
|
|
17
|
-
import 'pathe';
|
|
18
19
|
import 'std-env';
|
|
19
|
-
import '@vitest/runner/utils';
|
|
20
20
|
import 'chai';
|
|
21
21
|
import '../vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
22
22
|
import '@vitest/expect';
|
|
@@ -24,19 +24,19 @@ import '@vitest/snapshot';
|
|
|
24
24
|
import '@vitest/utils/error';
|
|
25
25
|
import '../vendor/tasks.IknbGB2n.js';
|
|
26
26
|
import '@vitest/utils/source-map';
|
|
27
|
-
import '../vendor/base.
|
|
27
|
+
import '../vendor/base.5NT-gWu5.js';
|
|
28
28
|
import '../vendor/date.Ns1pGd_X.js';
|
|
29
29
|
import '@vitest/spy';
|
|
30
|
-
import '@vitest/snapshot/environment';
|
|
31
30
|
import '../path.js';
|
|
32
31
|
import 'node:url';
|
|
33
32
|
import '../vendor/rpc.joBhAkyK.js';
|
|
34
33
|
import '../vendor/index.8bPxjt7g.js';
|
|
35
|
-
import '../vendor/benchmark.
|
|
34
|
+
import '../vendor/benchmark.yGkUTKnC.js';
|
|
35
|
+
import '../vendor/index.SMVOaj7F.js';
|
|
36
36
|
import '../vendor/run-once.Olz_Zkd8.js';
|
|
37
37
|
|
|
38
38
|
let globalSetup = false;
|
|
39
|
-
async function setupGlobalEnv(config, { environment }) {
|
|
39
|
+
async function setupGlobalEnv(config, { environment }, executor) {
|
|
40
40
|
await setupCommonEnv(config);
|
|
41
41
|
Object.defineProperty(globalThis, "__vitest_index__", {
|
|
42
42
|
value: VitestIndex,
|
|
@@ -44,7 +44,7 @@ async function setupGlobalEnv(config, { environment }) {
|
|
|
44
44
|
});
|
|
45
45
|
const state = getWorkerState();
|
|
46
46
|
if (!state.config.snapshotOptions.snapshotEnvironment)
|
|
47
|
-
state.config.snapshotOptions.snapshotEnvironment =
|
|
47
|
+
state.config.snapshotOptions.snapshotEnvironment = await resolveSnapshotEnvironment(config, executor);
|
|
48
48
|
if (globalSetup)
|
|
49
49
|
return;
|
|
50
50
|
globalSetup = true;
|
|
@@ -70,7 +70,7 @@ async function setupGlobalEnv(config, { environment }) {
|
|
|
70
70
|
await setupConsoleLogSpy();
|
|
71
71
|
}
|
|
72
72
|
async function setupConsoleLogSpy() {
|
|
73
|
-
const { createCustomConsole } = await import('./runtime-console.
|
|
73
|
+
const { createCustomConsole } = await import('./runtime-console.EO5ha7qv.js');
|
|
74
74
|
globalThis.console = createCustomConsole();
|
|
75
75
|
}
|
|
76
76
|
async function withEnv({ environment }, options, fn) {
|
|
@@ -90,7 +90,7 @@ async function withEnv({ environment }, options, fn) {
|
|
|
90
90
|
|
|
91
91
|
async function run(files, config, environment, executor) {
|
|
92
92
|
const workerState = getWorkerState();
|
|
93
|
-
await setupGlobalEnv(config, environment);
|
|
93
|
+
await setupGlobalEnv(config, environment, executor);
|
|
94
94
|
await startCoverageInsideWorker(config.coverage, executor);
|
|
95
95
|
if (config.chaiConfig)
|
|
96
96
|
setupChaiConfig(config.chaiConfig);
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as createCLI } from './vendor/cac.
|
|
1
|
+
import { c as createCLI } from './vendor/cac.EdDItJD-.js';
|
|
2
2
|
import 'pathe';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'picocolors';
|
|
5
|
-
import './vendor/base.
|
|
5
|
+
import './vendor/base.5NT-gWu5.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
7
|
import './vendor/constants.5J7I254_.js';
|
|
8
8
|
|
package/dist/config.cjs
CHANGED
|
@@ -5,7 +5,8 @@ var stdEnv = require('std-env');
|
|
|
5
5
|
var vite = require('vite');
|
|
6
6
|
|
|
7
7
|
var _a$1;
|
|
8
|
-
typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
|
|
8
|
+
const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
|
|
9
|
+
isNode && process.platform === "win32";
|
|
9
10
|
|
|
10
11
|
var _a, _b;
|
|
11
12
|
const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
|
|
@@ -22,7 +23,7 @@ const defaultCoverageExcludes = [
|
|
|
22
23
|
"cypress/**",
|
|
23
24
|
"test?(s)/**",
|
|
24
25
|
"test?(-*).?(c|m)[jt]s?(x)",
|
|
25
|
-
"**/*{.,-}{test,spec}.?(c|m)[jt]s?(x)",
|
|
26
|
+
"**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)",
|
|
26
27
|
"**/__tests__/**",
|
|
27
28
|
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
|
|
28
29
|
"**/vitest.{workspace,projects}.[jt]s?(on)",
|
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
|
|
2
|
-
export {
|
|
2
|
+
export { ax as UserConfigExport, aw as UserConfigFn, au as UserConfigFnObject, av as UserConfigFnPromise, az as UserProjectConfigExport, ay as UserProjectConfigFn, a1 as UserWorkspaceConfig, aD as configDefaults, aG as coverageConfigDefaults, aF as defaultExclude, aE as defaultInclude, aA as defineConfig, aB as defineProject, aC as defineWorkspace, aH as extraInlineDeps } from './reporters-yx5ZTtEV.js';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
|
5
5
|
import '@vitest/snapshot';
|
package/dist/config.js
CHANGED
|
@@ -3,7 +3,8 @@ import { isCI } from 'std-env';
|
|
|
3
3
|
export { mergeConfig } from 'vite';
|
|
4
4
|
|
|
5
5
|
var _a$1;
|
|
6
|
-
typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
|
|
6
|
+
const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
|
|
7
|
+
isNode && process.platform === "win32";
|
|
7
8
|
|
|
8
9
|
var _a, _b;
|
|
9
10
|
const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
|
|
@@ -20,7 +21,7 @@ const defaultCoverageExcludes = [
|
|
|
20
21
|
"cypress/**",
|
|
21
22
|
"test?(s)/**",
|
|
22
23
|
"test?(-*).?(c|m)[jt]s?(x)",
|
|
23
|
-
"**/*{.,-}{test,spec}.?(c|m)[jt]s?(x)",
|
|
24
|
+
"**/*{.,-}{test,spec}?(-d).?(c|m)[jt]s?(x)",
|
|
24
25
|
"**/__tests__/**",
|
|
25
26
|
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
|
|
26
27
|
"**/vitest.{workspace,projects}.[jt]s?(on)",
|
package/dist/coverage.d.ts
CHANGED
package/dist/environments.d.ts
CHANGED
package/dist/execute.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vm from 'node:vm';
|
|
2
2
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
3
3
|
import { ViteNodeRunnerOptions } from 'vite-node';
|
|
4
|
-
import {
|
|
4
|
+
import { ar as PendingSuiteMock, as as MockFactory, e as RuntimeRPC, W as WorkerGlobalState, at as MockMap } from './reporters-yx5ZTtEV.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import '@vitest/snapshot';
|
|
@@ -97,6 +97,7 @@ interface ExternalModulesExecutorOptions {
|
|
|
97
97
|
viteClientModule: Record<string, unknown>;
|
|
98
98
|
}
|
|
99
99
|
declare class ExternalModulesExecutor {
|
|
100
|
+
#private;
|
|
100
101
|
private options;
|
|
101
102
|
private cjs;
|
|
102
103
|
private esm;
|
|
@@ -105,6 +106,9 @@ declare class ExternalModulesExecutor {
|
|
|
105
106
|
private fs;
|
|
106
107
|
private resolvers;
|
|
107
108
|
constructor(options: ExternalModulesExecutorOptions);
|
|
109
|
+
import(identifier: string): Promise<Object>;
|
|
110
|
+
require(identifier: string): any;
|
|
111
|
+
createRequire(identifier: string): NodeRequire;
|
|
108
112
|
importModuleDynamically: (specifier: string, referencer: VMModule) => Promise<VMModule>;
|
|
109
113
|
resolveModule: (specifier: string, referencer: string) => Promise<VMModule>;
|
|
110
114
|
resolve(specifier: string, parent: string): string;
|
|
@@ -113,9 +117,7 @@ declare class ExternalModulesExecutor {
|
|
|
113
117
|
private wrapCommonJsSynteticModule;
|
|
114
118
|
private getModuleInformation;
|
|
115
119
|
private createModule;
|
|
116
|
-
|
|
117
|
-
require(identifier: string): any;
|
|
118
|
-
createRequire(identifier: string): NodeRequire;
|
|
120
|
+
private get isNetworkSupported();
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
interface ExecuteOptions extends ViteNodeRunnerOptions {
|
package/dist/execute.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { V as VitestExecutor } from './vendor/execute.
|
|
1
|
+
export { V as VitestExecutor } from './vendor/execute.fL3szUAI.js';
|
|
2
2
|
import 'node:vm';
|
|
3
3
|
import 'node:url';
|
|
4
|
+
import 'node:fs';
|
|
4
5
|
import 'vite-node/client';
|
|
5
6
|
import 'vite-node/utils';
|
|
6
7
|
import 'pathe';
|
|
7
8
|
import '@vitest/utils/error';
|
|
8
9
|
import './path.js';
|
|
9
|
-
import 'node:fs';
|
|
10
10
|
import '@vitest/utils';
|
|
11
|
-
import './vendor/base.
|
|
11
|
+
import './vendor/base.5NT-gWu5.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TaskPopulated, File, TaskResultPack, CancelReason } from '@vitest/runner';
|
|
2
2
|
export { Custom, DoneCallback, ExtendedContext, File, HookCleanupCallback, HookListener, OnTestFailedHandler, RunMode, RuntimeContext, SequenceHooks, SequenceSetupFiles, Suite, SuiteAPI, SuiteCollector, SuiteFactory, SuiteHooks, Task, TaskBase, TaskContext, TaskCustomOptions, TaskMeta, TaskResult, TaskResultPack, TaskState, Test, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
export { b as bench } from './suite-
|
|
3
|
+
export { b as bench } from './suite-IbNSsUWN.js';
|
|
4
4
|
import { ExpectStatic } from '@vitest/expect';
|
|
5
5
|
export { Assertion, AsymmetricMatchersContaining, ExpectStatic, JestAssertion } from '@vitest/expect';
|
|
6
|
-
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper,
|
|
7
|
-
export {
|
|
6
|
+
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, s as RuntimeConfig, P as ProvidedContext, A as AfterSuiteRunMeta, t as UserConsoleLog, R as ResolvedConfig, u as ModuleGraphData, v as Reporter } from './reporters-yx5ZTtEV.js';
|
|
7
|
+
export { Q as ApiConfig, aa as ArgumentsType, a9 as Arrayable, a7 as Awaitable, B as BaseCoverageOptions, ap as BenchFunction, an as Benchmark, aq as BenchmarkAPI, ao as BenchmarkResult, am as BenchmarkUserOptions, a0 as BrowserConfigOptions, r as BrowserScript, L as BuiltinEnvironment, O as CSSModuleScopeStrategy, y as CollectLineNumbers, z as CollectLines, ac as Constructable, G as Context, f as ContextRPC, a3 as ContextTestEnvironment, aj as CoverageIstanbulOptions, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, ai as CoverageReporter, ak as CoverageV8Options, al as CustomProviderOptions, X as DepsOptimizationOptions, E as Environment, S as EnvironmentOptions, ae as EnvironmentReturn, K as HappyDOMOptions, Z as InlineConfig, J as JSDOMOptions, ad as ModuleCache, ab as MutableArray, a8 as Nullable, ag as OnServerRestartHandler, H as Pool, I as PoolOptions, $ as ProjectConfig, w as RawErrsMap, ah as ReportContext, a5 as ResolveIdFunction, a as ResolvedCoverageOptions, a4 as ResolvedTestEnvironment, D as RootAndTarget, a2 as RunnerRPC, e as RuntimeRPC, Y as TransformModePatterns, x as TscErrorInfo, _ as TypecheckConfig, U as UserConfig, a1 as UserWorkspaceConfig, i as Vitest, N as VitestEnvironment, V as VitestRunMode, af as VmEnvironmentReturn, g as WorkerContext, W as WorkerGlobalState, a6 as WorkerRPC } from './reporters-yx5ZTtEV.js';
|
|
8
8
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
9
9
|
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
|
|
10
10
|
export { SnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
@@ -683,6 +683,7 @@ interface WebSocketHandlers {
|
|
|
683
683
|
getCountOfFailedTests: () => number;
|
|
684
684
|
sendLog: (log: UserConsoleLog) => void;
|
|
685
685
|
getFiles: () => File[];
|
|
686
|
+
getTestFiles: () => Promise<[name: string, file: string][]>;
|
|
686
687
|
getPaths: () => string[];
|
|
687
688
|
getConfig: () => ResolvedConfig;
|
|
688
689
|
resolveSnapshotPath: (testPath: string) => string;
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
2
|
-
export { b as bench } from './vendor/benchmark.
|
|
2
|
+
export { b as bench } from './vendor/benchmark.yGkUTKnC.js';
|
|
3
3
|
export { i as isFirstRun, a as runOnce } from './vendor/run-once.Olz_Zkd8.js';
|
|
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.
|
|
4
|
+
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor/vi.YFlodzP_.js';
|
|
5
|
+
import { d as dist } from './vendor/index.dI9lHwVn.js';
|
|
6
|
+
export { b as assertType, g as getRunningMode, i as inject, a as isWatchMode } from './vendor/index.dI9lHwVn.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.SMVOaj7F.js';
|
|
13
13
|
import 'pathe';
|
|
14
|
-
import 'std-env';
|
|
15
14
|
import './vendor/global.CkGT_TMy.js';
|
|
15
|
+
import './vendor/env.AtSIuHFg.js';
|
|
16
|
+
import 'std-env';
|
|
16
17
|
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
17
18
|
import '@vitest/expect';
|
|
18
19
|
import '@vitest/snapshot';
|
|
19
20
|
import '@vitest/utils/error';
|
|
20
21
|
import './vendor/tasks.IknbGB2n.js';
|
|
21
22
|
import '@vitest/utils/source-map';
|
|
22
|
-
import './vendor/base.
|
|
23
|
+
import './vendor/base.5NT-gWu5.js';
|
|
23
24
|
import './vendor/date.Ns1pGd_X.js';
|
|
24
25
|
import '@vitest/spy';
|
|
25
26
|
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VitestRunMode, U as UserConfig, h as VitestOptions, i as Vitest, R as ResolvedConfig, P as ProvidedContext, j as WorkspaceProject, e as RuntimeRPC, T as TestSequencer, k as WorkspaceSpec } from './reporters-
|
|
2
|
-
export { p as BrowserProvider, o as BrowserProviderInitializationOptions, q as BrowserProviderOptions, l as ProcessPool, n as TestSequencerConstructor, m as VitestPackageInstaller } from './reporters-
|
|
1
|
+
import { V as VitestRunMode, U as UserConfig, h as VitestOptions, i as Vitest, R as ResolvedConfig, P as ProvidedContext, j as WorkspaceProject, e as RuntimeRPC, T as TestSequencer, k as WorkspaceSpec } from './reporters-yx5ZTtEV.js';
|
|
2
|
+
export { p as BrowserProvider, o as BrowserProviderInitializationOptions, q as BrowserProviderOptions, r as BrowserScript, l as ProcessPool, n as TestSequencerConstructor, m as VitestPackageInstaller } from './reporters-yx5ZTtEV.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import { Writable } from 'node:stream';
|
|
5
5
|
import '@vitest/runner';
|
package/dist/node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 { B as BaseSequencer } from './vendor/index.
|
|
1
|
+
export { b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/cli-api.E07AF1Yq.js';
|
|
2
|
+
export { p as parseCLI } from './vendor/cac.EdDItJD-.js';
|
|
3
|
+
export { B as BaseSequencer } from './vendor/index.Q04MCqDO.js';
|
|
4
4
|
import 'pathe';
|
|
5
5
|
import './vendor/constants.5J7I254_.js';
|
|
6
6
|
import './vendor/coverage.E7sG1b3r.js';
|
|
@@ -24,11 +24,11 @@ import 'picocolors';
|
|
|
24
24
|
import 'vite-node/client';
|
|
25
25
|
import '@vitest/snapshot/manager';
|
|
26
26
|
import 'vite-node/server';
|
|
27
|
-
import './vendor/index.ir9i0ywP.js';
|
|
28
|
-
import 'std-env';
|
|
29
27
|
import '@vitest/runner/utils';
|
|
28
|
+
import './vendor/base.5NT-gWu5.js';
|
|
30
29
|
import '@vitest/utils';
|
|
31
|
-
import './vendor/
|
|
30
|
+
import './vendor/env.AtSIuHFg.js';
|
|
31
|
+
import 'std-env';
|
|
32
32
|
import './path.js';
|
|
33
33
|
import './vendor/index.8bPxjt7g.js';
|
|
34
34
|
import 'zlib';
|
|
@@ -40,28 +40,29 @@ import 'net';
|
|
|
40
40
|
import 'tls';
|
|
41
41
|
import 'url';
|
|
42
42
|
import '@vitest/utils/source-map';
|
|
43
|
-
import './vendor/base.Xt0Omgh7.js';
|
|
44
43
|
import 'node:v8';
|
|
45
44
|
import 'node:os';
|
|
46
45
|
import 'node:events';
|
|
47
46
|
import 'tinypool';
|
|
48
|
-
import 'local-pkg';
|
|
49
47
|
import 'node:crypto';
|
|
48
|
+
import 'node:fs/promises';
|
|
49
|
+
import 'local-pkg';
|
|
50
50
|
import 'vite-node/utils';
|
|
51
51
|
import 'magic-string';
|
|
52
52
|
import 'acorn-walk';
|
|
53
53
|
import '@vitest/utils/ast';
|
|
54
54
|
import 'strip-literal';
|
|
55
|
-
import './vendor/utils.
|
|
55
|
+
import './vendor/utils.dEtNIEgr.js';
|
|
56
56
|
import 'node:module';
|
|
57
|
+
import './vendor/index.SMVOaj7F.js';
|
|
58
|
+
import './vendor/global.CkGT_TMy.js';
|
|
57
59
|
import 'node:readline';
|
|
58
60
|
import 'readline';
|
|
59
61
|
import './vendor/tasks.IknbGB2n.js';
|
|
60
62
|
import 'node:perf_hooks';
|
|
61
|
-
import './chunks/runtime-console.
|
|
63
|
+
import './chunks/runtime-console.EO5ha7qv.js';
|
|
62
64
|
import 'node:stream';
|
|
63
65
|
import './vendor/date.Ns1pGd_X.js';
|
|
64
|
-
import 'node:fs/promises';
|
|
65
66
|
import 'execa';
|
|
66
67
|
import 'module';
|
|
67
68
|
import 'assert';
|