vitest 4.0.16 → 4.0.18
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 +2 -1
- package/dist/browser.js +1 -0
- package/dist/chunks/{base.Bin-9uYm.js → base.CJ0Y4ePK.js} +3 -2
- package/dist/chunks/{browser.d.Bz3lxTX-.d.ts → browser.d.ChKACdzH.d.ts} +3 -1
- package/dist/chunks/{cac.BGonGPac.js → cac.DVeoLl0M.js} +6 -6
- package/dist/chunks/{cli-api.BKg19Fvw.js → cli-api.B7PN_QUv.js} +127 -60
- package/dist/chunks/{config.d.CzIjkicf.d.ts → config.d.Cy95HiCx.d.ts} +5 -0
- package/dist/chunks/{coverage.BuJUwVtg.js → coverage.AVPTjMgw.js} +4 -0
- package/dist/chunks/{index.Drsj_6e7.js → index.C5r1PdPD.js} +1 -1
- package/dist/chunks/{index.BspFP3mn.js → index.CyBMJtT7.js} +1 -1
- package/dist/chunks/{index.456_DGfR.js → index.M8mOzt4Y.js} +26 -2
- package/dist/chunks/{init-forks.v9UONQS6.js → init-forks._y3TW739.js} +1 -1
- package/dist/chunks/{init-threads.DqYg3Trk.js → init-threads.DBO2kn-p.js} +1 -1
- package/dist/chunks/{init.KmQZdqFg.js → init.B6MLFIaN.js} +23 -10
- package/dist/chunks/{plugin.d.v1sC_bv1.d.ts → plugin.d.CtqpEehP.d.ts} +1 -1
- package/dist/chunks/{reporters.d.Rsi0PyxX.d.ts → reporters.d.CWXNI2jG.d.ts} +6 -5
- package/dist/chunks/{startModuleRunner.DpqpB8k3.js → startModuleRunner.DEj0jb3e.js} +1 -1
- package/dist/chunks/{traces.U4xDYhzZ.js → traces.CCmnQaNT.js} +46 -1
- package/dist/chunks/{vm.qFl6P1nF.js → vm.D3epNOPZ.js} +4 -7
- package/dist/chunks/{worker.d.5JNaocaN.d.ts → worker.d.Dyxm8DEL.d.ts} +2 -1
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +6 -6
- package/dist/coverage.d.ts +5 -5
- package/dist/coverage.js +1 -1
- package/dist/environments.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/module-evaluator.js +2 -6
- package/dist/module-runner.js +3 -3
- package/dist/node.d.ts +10 -8
- package/dist/node.js +8 -8
- package/dist/reporters.d.ts +4 -4
- package/dist/reporters.js +2 -2
- package/dist/runners.d.ts +1 -1
- package/dist/worker.d.ts +4 -3
- package/dist/worker.js +5 -5
- package/dist/workers/forks.js +6 -6
- package/dist/workers/threads.js +6 -6
- package/dist/workers/vmForks.js +6 -6
- package/dist/workers/vmThreads.js +6 -6
- package/package.json +12 -12
|
@@ -2714,6 +2714,17 @@ class Typechecker {
|
|
|
2714
2714
|
markTasks(file.tasks);
|
|
2715
2715
|
}
|
|
2716
2716
|
async prepareResults(output) {
|
|
2717
|
+
// Detect if tsc output is help text instead of error output
|
|
2718
|
+
// This happens when tsconfig.json is missing and tsc can't find any config
|
|
2719
|
+
if (output.includes("The TypeScript Compiler - Version") || output.includes("COMMON COMMANDS")) {
|
|
2720
|
+
const { typecheck } = this.project.config;
|
|
2721
|
+
const msg = `TypeScript compiler returned help text instead of type checking results.
|
|
2722
|
+
This usually means the tsconfig file was not found.
|
|
2723
|
+
|
|
2724
|
+
Possible solutions:
|
|
2725
|
+
1. Ensure '${typecheck.tsconfig || "tsconfig.json"}' exists in your project root\n 2. If using a custom tsconfig, verify the path in your Vitest config:\n test: { typecheck: { tsconfig: 'path/to/tsconfig.json' } }\n 3. Check that the tsconfig file is valid JSON`;
|
|
2726
|
+
throw new Error(msg);
|
|
2727
|
+
}
|
|
2717
2728
|
const typeErrors = await this.parseTscLikeOutput(output);
|
|
2718
2729
|
const testFiles = new Set(this.getFiles());
|
|
2719
2730
|
if (!this._tests) this._tests = await this.collectTests();
|
|
@@ -2847,6 +2858,7 @@ class Typechecker {
|
|
|
2847
2858
|
reject(/* @__PURE__ */ new Error(`Failed to initialize ${typecheck.checker}. This is a bug in Vitest - please, open an issue with reproduction.`));
|
|
2848
2859
|
return;
|
|
2849
2860
|
}
|
|
2861
|
+
let resolved = false;
|
|
2850
2862
|
child.process.stdout.on("data", (chunk) => {
|
|
2851
2863
|
dataReceived = true;
|
|
2852
2864
|
this._output += chunk;
|
|
@@ -2868,9 +2880,17 @@ class Typechecker {
|
|
|
2868
2880
|
this._output = "";
|
|
2869
2881
|
}
|
|
2870
2882
|
});
|
|
2883
|
+
// Also capture stderr for configuration errors like missing tsconfig
|
|
2884
|
+
child.process.stderr?.on("data", (chunk) => {
|
|
2885
|
+
this._output += chunk;
|
|
2886
|
+
});
|
|
2871
2887
|
const timeout = setTimeout(() => reject(/* @__PURE__ */ new Error(`${typecheck.checker} spawn timed out`)), this.project.config.typecheck.spawnTimeout);
|
|
2888
|
+
let winTimeout;
|
|
2872
2889
|
function onError(cause) {
|
|
2890
|
+
if (resolved) return;
|
|
2873
2891
|
clearTimeout(timeout);
|
|
2892
|
+
clearTimeout(winTimeout);
|
|
2893
|
+
resolved = true;
|
|
2874
2894
|
reject(new Error("Spawning typechecker failed - is typescript installed?", { cause }));
|
|
2875
2895
|
}
|
|
2876
2896
|
child.process.once("spawn", () => {
|
|
@@ -2881,10 +2901,14 @@ class Typechecker {
|
|
|
2881
2901
|
// on Windows, the process might be spawned but fail to start
|
|
2882
2902
|
// we wait for a potential error here. if "close" event didn't trigger,
|
|
2883
2903
|
// we resolve the promise
|
|
2884
|
-
setTimeout(() => {
|
|
2904
|
+
winTimeout = setTimeout(() => {
|
|
2905
|
+
resolved = true;
|
|
2885
2906
|
resolve({ result: child });
|
|
2886
2907
|
}, 200);
|
|
2887
|
-
else
|
|
2908
|
+
else {
|
|
2909
|
+
resolved = true;
|
|
2910
|
+
resolve({ result: child });
|
|
2911
|
+
}
|
|
2888
2912
|
});
|
|
2889
2913
|
if (process.platform === "win32") child.process.once("close", (code) => {
|
|
2890
2914
|
if (code != null && code !== 0 && !dataReceived) onError(/* @__PURE__ */ new Error(`The ${typecheck.checker} command exited with code ${code}.`));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isMainThread, parentPort } from 'node:worker_threads';
|
|
2
|
-
import { i as init } from './init.
|
|
2
|
+
import { i as init } from './init.B6MLFIaN.js';
|
|
3
3
|
|
|
4
4
|
if (isMainThread || !parentPort) throw new Error("Expected worker to be run in node:worker_threads");
|
|
5
5
|
function workerInit(options) {
|
|
@@ -3,10 +3,10 @@ import { isBuiltin } from 'node:module';
|
|
|
3
3
|
import { pathToFileURL } from 'node:url';
|
|
4
4
|
import { resolve } from 'pathe';
|
|
5
5
|
import { ModuleRunner } from 'vite/module-runner';
|
|
6
|
-
import { b as VitestTransport } from './startModuleRunner.
|
|
7
|
-
import { e as environments } from './index.
|
|
6
|
+
import { b as VitestTransport } from './startModuleRunner.DEj0jb3e.js';
|
|
7
|
+
import { e as environments } from './index.CyBMJtT7.js';
|
|
8
8
|
import { serializeError } from '@vitest/utils/error';
|
|
9
|
-
import { T as Traces } from './traces.
|
|
9
|
+
import { T as Traces } from './traces.CCmnQaNT.js';
|
|
10
10
|
import { o as onCancel, a as rpcDone, c as createRuntimeRpc } from './rpc.BoxB0q7B.js';
|
|
11
11
|
import { createStackString, parseStacktrace } from '@vitest/utils/source-map';
|
|
12
12
|
import { s as setupInspect } from './inspector.CvyFGlXm.js';
|
|
@@ -65,8 +65,22 @@ async function loadEnvironment(name, root, rpc, traces) {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
const cleanupListeners = /* @__PURE__ */ new Set();
|
|
69
|
+
const moduleRunnerListeners = /* @__PURE__ */ new Set();
|
|
70
|
+
function onCleanup(cb) {
|
|
71
|
+
cleanupListeners.add(cb);
|
|
72
|
+
}
|
|
73
|
+
async function cleanup() {
|
|
74
|
+
await Promise.all([...cleanupListeners].map((l) => l()));
|
|
75
|
+
}
|
|
76
|
+
function onModuleRunner(cb) {
|
|
77
|
+
moduleRunnerListeners.add(cb);
|
|
78
|
+
}
|
|
79
|
+
function emitModuleRunner(moduleRunner) {
|
|
80
|
+
moduleRunnerListeners.forEach((l) => l(moduleRunner));
|
|
81
|
+
}
|
|
82
|
+
|
|
68
83
|
const resolvingModules = /* @__PURE__ */ new Set();
|
|
69
|
-
const globalListeners = /* @__PURE__ */ new Set();
|
|
70
84
|
async function execute(method, ctx, worker, traces) {
|
|
71
85
|
const prepareStart = performance.now();
|
|
72
86
|
const cleanups = [setupInspect(ctx)];
|
|
@@ -92,7 +106,7 @@ async function execute(method, ctx, worker, traces) {
|
|
|
92
106
|
},
|
|
93
107
|
rpc,
|
|
94
108
|
onCancel,
|
|
95
|
-
onCleanup:
|
|
109
|
+
onCleanup: onCleanup,
|
|
96
110
|
providedContext: ctx.providedContext,
|
|
97
111
|
onFilterStackTrace(stack) {
|
|
98
112
|
return createStackString(parseStacktrace(stack));
|
|
@@ -114,7 +128,7 @@ function collect(ctx, worker, traces) {
|
|
|
114
128
|
return execute("collect", ctx, worker, traces);
|
|
115
129
|
}
|
|
116
130
|
async function teardown() {
|
|
117
|
-
await
|
|
131
|
+
await cleanup();
|
|
118
132
|
}
|
|
119
133
|
const env = process.env;
|
|
120
134
|
function createImportMetaEnvProxy() {
|
|
@@ -146,6 +160,7 @@ let traces;
|
|
|
146
160
|
/** @experimental */
|
|
147
161
|
function init(worker) {
|
|
148
162
|
worker.on(onMessage);
|
|
163
|
+
if (worker.onModuleRunner) onModuleRunner(worker.onModuleRunner);
|
|
149
164
|
let runPromise;
|
|
150
165
|
let isRunning = false;
|
|
151
166
|
let workerTeardown;
|
|
@@ -161,16 +176,14 @@ function init(worker) {
|
|
|
161
176
|
process.env.VITEST_POOL_ID = String(message.poolId);
|
|
162
177
|
process.env.VITEST_WORKER_ID = String(message.workerId);
|
|
163
178
|
reportMemory = message.options.reportMemory;
|
|
164
|
-
const tracesStart = performance.now();
|
|
165
179
|
traces ??= await new Traces({
|
|
166
180
|
enabled: message.traces.enabled,
|
|
167
181
|
sdkPath: message.traces.sdkPath
|
|
168
182
|
}).waitInit();
|
|
169
|
-
const tracesEnd = performance.now();
|
|
170
183
|
const { environment, config, pool } = message.context;
|
|
171
184
|
const context = traces.getContextFromCarrier(message.traces.otelCarrier);
|
|
172
185
|
// record telemetry as part of "start"
|
|
173
|
-
traces.
|
|
186
|
+
traces.recordInitSpan(context);
|
|
174
187
|
try {
|
|
175
188
|
setupContext = {
|
|
176
189
|
environment,
|
|
@@ -318,4 +331,4 @@ function getFilesWithLocations(files) {
|
|
|
318
331
|
});
|
|
319
332
|
}
|
|
320
333
|
|
|
321
|
-
export { init as i, loadEnvironment as l };
|
|
334
|
+
export { emitModuleRunner as e, init as i, loadEnvironment as l };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DevEnvironment } from 'vite';
|
|
2
|
-
import { V as Vitest, T as TestProject, b as TestProjectConfiguration } from './reporters.d.
|
|
2
|
+
import { V as Vitest, T as TestProject, b as TestProjectConfiguration } from './reporters.d.CWXNI2jG.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Generate a unique cache identifier.
|
|
@@ -3,17 +3,17 @@ import { TestError, SerializedError, Arrayable, ParsedStack, Awaitable } from '@
|
|
|
3
3
|
import { A as AfterSuiteRunMeta, U as UserConsoleLog, P as ProvidedContext, L as LabelColor } from './rpc.d.RH3apGEf.js';
|
|
4
4
|
import { Writable } from 'node:stream';
|
|
5
5
|
import { DevEnvironment, TransformResult as TransformResult$1, ViteDevServer, Plugin, UserConfig as UserConfig$1, DepOptimizationConfig, ServerOptions, ConfigEnv, AliasOptions } from 'vite';
|
|
6
|
-
import { S as SerializedTestSpecification, c as SourceModuleDiagnostic, B as BrowserTesterOptions } from './browser.d.
|
|
6
|
+
import { S as SerializedTestSpecification, c as SourceModuleDiagnostic, B as BrowserTesterOptions } from './browser.d.ChKACdzH.js';
|
|
7
7
|
import { MockedModule } from '@vitest/mocker';
|
|
8
8
|
import { StackTraceParserOptions } from '@vitest/utils/source-map';
|
|
9
9
|
import { BrowserCommands } from 'vitest/browser';
|
|
10
|
-
import { B as BrowserTraceViewMode, S as SerializedConfig, F as FakeTimerInstallOpts } from './config.d.
|
|
10
|
+
import { B as BrowserTraceViewMode, S as SerializedConfig, F as FakeTimerInstallOpts } from './config.d.Cy95HiCx.js';
|
|
11
11
|
import { PrettyFormatOptions } from '@vitest/pretty-format';
|
|
12
12
|
import { SnapshotSummary, SnapshotStateOptions } from '@vitest/snapshot';
|
|
13
13
|
import { SerializedDiffOptions } from '@vitest/utils/diff';
|
|
14
14
|
import { chai } from '@vitest/expect';
|
|
15
15
|
import { happyDomTypes, jsdomTypes } from 'vitest/optional-types.js';
|
|
16
|
-
import { c as ContextTestEnvironment, d as WorkerExecuteContext, e as WorkerTestEnvironment } from './worker.d.
|
|
16
|
+
import { c as ContextTestEnvironment, d as WorkerExecuteContext, e as WorkerTestEnvironment } from './worker.d.Dyxm8DEL.js';
|
|
17
17
|
import { O as OTELCarrier } from './traces.d.402V_yFI.js';
|
|
18
18
|
import { B as BenchmarkResult } from './benchmark.d.DAaHLpsq.js';
|
|
19
19
|
import { a as RuntimeCoverageProviderModule } from './coverage.d.BZtK59WP.js';
|
|
@@ -1924,8 +1924,8 @@ interface PoolWorker {
|
|
|
1924
1924
|
stop: () => Promise<void>;
|
|
1925
1925
|
/**
|
|
1926
1926
|
* This is called on workers that already satisfy certain constraints:
|
|
1927
|
+
* - The task has the same worker name
|
|
1927
1928
|
* - The task has the same project
|
|
1928
|
-
* - The task has the same environment
|
|
1929
1929
|
*/
|
|
1930
1930
|
canReuse?: (task: PoolTask) => boolean;
|
|
1931
1931
|
}
|
|
@@ -1944,7 +1944,6 @@ interface PoolTask {
|
|
|
1944
1944
|
*/
|
|
1945
1945
|
execArgv: string[];
|
|
1946
1946
|
context: WorkerExecuteContext;
|
|
1947
|
-
environment: ContextTestEnvironment;
|
|
1948
1947
|
memoryLimit: number | null;
|
|
1949
1948
|
}
|
|
1950
1949
|
type WorkerRequest = {
|
|
@@ -3035,6 +3034,7 @@ interface InlineConfig {
|
|
|
3035
3034
|
openTelemetry?: {
|
|
3036
3035
|
enabled: boolean;
|
|
3037
3036
|
sdkPath?: string;
|
|
3037
|
+
browserSdkPath?: string;
|
|
3038
3038
|
};
|
|
3039
3039
|
/**
|
|
3040
3040
|
* Show imports (top 10) that take a long time.
|
|
@@ -3187,6 +3187,7 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, "project" | "config"
|
|
|
3187
3187
|
poolRunner?: PoolRunnerInitializer;
|
|
3188
3188
|
reporters: (InlineReporter | ReporterWithOptions)[];
|
|
3189
3189
|
defines: Record<string, any>;
|
|
3190
|
+
viteDefine: Record<string, any>;
|
|
3190
3191
|
api: ApiConfig & {
|
|
3191
3192
|
token: string;
|
|
3192
3193
|
};
|
|
@@ -11,7 +11,7 @@ import vm from 'node:vm';
|
|
|
11
11
|
import { MockerRegistry, mockObject, RedirectedModule, AutomockedModule } from '@vitest/mocker';
|
|
12
12
|
import nodeModule from 'node:module';
|
|
13
13
|
import * as viteModuleRunner from 'vite/module-runner';
|
|
14
|
-
import { T as Traces } from './traces.
|
|
14
|
+
import { T as Traces } from './traces.CCmnQaNT.js';
|
|
15
15
|
|
|
16
16
|
class VitestTransport {
|
|
17
17
|
constructor(options) {
|
|
@@ -7,6 +7,9 @@ class Traces {
|
|
|
7
7
|
#init = null;
|
|
8
8
|
#noopSpan = createNoopSpan();
|
|
9
9
|
#noopContext = createNoopContext();
|
|
10
|
+
#initStartTime = performance.now();
|
|
11
|
+
#initEndTime = 0;
|
|
12
|
+
#initRecorded = false;
|
|
10
13
|
constructor(options) {
|
|
11
14
|
if (options.enabled) {
|
|
12
15
|
const apiInit = import('@opentelemetry/api').then((api) => {
|
|
@@ -21,7 +24,10 @@ class Traces {
|
|
|
21
24
|
}).catch(() => {
|
|
22
25
|
throw new Error(`"@opentelemetry/api" is not installed locally. Make sure you have setup OpenTelemetry instrumentation: https://vitest.dev/guide/open-telemetry`);
|
|
23
26
|
});
|
|
24
|
-
const sdkInit = (options.sdkPath ? import(
|
|
27
|
+
const sdkInit = (options.sdkPath ? import(
|
|
28
|
+
/* @vite-ignore */
|
|
29
|
+
options.sdkPath
|
|
30
|
+
) : Promise.resolve()).catch((cause) => {
|
|
25
31
|
throw new Error(`Failed to import custom OpenTelemetry SDK script (${options.sdkPath}): ${cause.message}`);
|
|
26
32
|
});
|
|
27
33
|
this.#init = Promise.all([sdkInit, apiInit]).then(([sdk]) => {
|
|
@@ -30,6 +36,7 @@ class Traces {
|
|
|
30
36
|
else if (options.watchMode !== true && process.env.VITEST_MODE !== "watch") console.warn(`OpenTelemetry instrumentation module (${options.sdkPath}) does not have a default export with a "shutdown" method. Vitest won't be able to ensure that all traces are processed in time. Try running Vitest in watch mode instead.`);
|
|
31
37
|
}
|
|
32
38
|
}).finally(() => {
|
|
39
|
+
this.#initEndTime = performance.now();
|
|
33
40
|
this.#init = null;
|
|
34
41
|
});
|
|
35
42
|
}
|
|
@@ -47,6 +54,14 @@ class Traces {
|
|
|
47
54
|
/**
|
|
48
55
|
* @internal
|
|
49
56
|
*/
|
|
57
|
+
recordInitSpan(context) {
|
|
58
|
+
if (this.#initRecorded) return;
|
|
59
|
+
this.#initRecorded = true;
|
|
60
|
+
this.startSpan("vitest.runtime.traces", { startTime: this.#initStartTime }, context).end(this.#initEndTime);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
50
65
|
startContextSpan(name, currentContext) {
|
|
51
66
|
if (!this.#otel) return {
|
|
52
67
|
span: this.#noopSpan,
|
|
@@ -71,6 +86,18 @@ class Traces {
|
|
|
71
86
|
/**
|
|
72
87
|
* @internal
|
|
73
88
|
*/
|
|
89
|
+
getContextFromEnv(env) {
|
|
90
|
+
if (!this.#otel) return this.#noopContext;
|
|
91
|
+
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/env-carriers.md
|
|
92
|
+
// some tools sets only `TRACEPARENT` but not `TRACESTATE`
|
|
93
|
+
const carrier = {};
|
|
94
|
+
if (typeof env.TRACEPARENT === "string") carrier.traceparent = env.TRACEPARENT;
|
|
95
|
+
if (typeof env.TRACESTATE === "string") carrier.tracestate = env.TRACESTATE;
|
|
96
|
+
return this.getContextFromCarrier(carrier);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
74
101
|
getContextCarrier(context) {
|
|
75
102
|
if (!this.#otel) return;
|
|
76
103
|
const carrier = {};
|
|
@@ -127,12 +154,30 @@ class Traces {
|
|
|
127
154
|
const { tracer } = this.#otel;
|
|
128
155
|
return tracer.startSpan(name, options, context);
|
|
129
156
|
}
|
|
157
|
+
// On browser mode, async context is not automatically propagated,
|
|
158
|
+
// so we manually bind the `$` calls to the provided context.
|
|
159
|
+
// TODO: this doesn't bind to user land's `@optelemetry/api` calls
|
|
160
|
+
/**
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
163
|
+
bind(context) {
|
|
164
|
+
if (!this.#otel) return;
|
|
165
|
+
const original = this.$.__original ?? this.$;
|
|
166
|
+
this.$ = this.#otel.context.bind(context, original);
|
|
167
|
+
this.$.__original = original;
|
|
168
|
+
}
|
|
130
169
|
/**
|
|
131
170
|
* @internal
|
|
132
171
|
*/
|
|
133
172
|
async finish() {
|
|
134
173
|
await this.#sdk?.shutdown();
|
|
135
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
async flush() {
|
|
179
|
+
await this.#sdk?.forceFlush?.();
|
|
180
|
+
}
|
|
136
181
|
}
|
|
137
182
|
function noopSpan() {
|
|
138
183
|
return this;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
2
2
|
import vm, { isContext, runInContext } from 'node:vm';
|
|
3
3
|
import { dirname, basename, extname, normalize, resolve } from 'pathe';
|
|
4
|
-
import { l as loadEnvironment } from './init.
|
|
4
|
+
import { l as loadEnvironment, e as emitModuleRunner } from './init.B6MLFIaN.js';
|
|
5
5
|
import { distDir } from '../path.js';
|
|
6
6
|
import { createCustomConsole } from './console.Cf-YriPC.js';
|
|
7
7
|
import fs from 'node:fs';
|
|
@@ -11,7 +11,7 @@ import { findNearestPackageData } from '@vitest/utils/resolver';
|
|
|
11
11
|
import { dirname as dirname$1 } from 'node:path';
|
|
12
12
|
import { CSS_LANGS_RE, KNOWN_ASSET_RE } from '@vitest/utils/constants';
|
|
13
13
|
import { getDefaultRequestStubs } from '../module-evaluator.js';
|
|
14
|
-
import { s as startVitestModuleRunner, c as createNodeImportMeta, a as VITEST_VM_CONTEXT_SYMBOL } from './startModuleRunner.
|
|
14
|
+
import { s as startVitestModuleRunner, c as createNodeImportMeta, a as VITEST_VM_CONTEXT_SYMBOL } from './startModuleRunner.DEj0jb3e.js';
|
|
15
15
|
import { p as provideWorkerState } from './utils.DvEY5TfP.js';
|
|
16
16
|
|
|
17
17
|
function interopCommonJsModule(interopDefault, mod) {
|
|
@@ -716,6 +716,7 @@ async function runVmTests(method, state, traces) {
|
|
|
716
716
|
createImportMeta: createNodeImportMeta,
|
|
717
717
|
traces
|
|
718
718
|
});
|
|
719
|
+
emitModuleRunner(moduleRunner);
|
|
719
720
|
Object.defineProperty(context, VITEST_VM_CONTEXT_SYMBOL, {
|
|
720
721
|
value: {
|
|
721
722
|
context,
|
|
@@ -733,12 +734,8 @@ async function runVmTests(method, state, traces) {
|
|
|
733
734
|
}
|
|
734
735
|
await moduleRunner.mocker.initializeSpyModule();
|
|
735
736
|
const { run } = await moduleRunner.import(entryFile);
|
|
736
|
-
const fileSpecs = ctx.files.map((f) => typeof f === "string" ? {
|
|
737
|
-
filepath: f,
|
|
738
|
-
testLocations: void 0
|
|
739
|
-
} : f);
|
|
740
737
|
try {
|
|
741
|
-
await run(method,
|
|
738
|
+
await run(method, ctx.files, ctx.config, moduleRunner, traces);
|
|
742
739
|
} finally {
|
|
743
740
|
await traces.$("vitest.runtime.environment.teardown", () => vm.teardown?.());
|
|
744
741
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileSpecification, Task, CancelReason } from '@vitest/runner';
|
|
2
2
|
import { EvaluatedModules } from 'vite/module-runner';
|
|
3
|
-
import { S as SerializedConfig } from './config.d.
|
|
3
|
+
import { S as SerializedConfig } from './config.d.Cy95HiCx.js';
|
|
4
4
|
import { E as Environment } from './environment.d.CrsxCzP1.js';
|
|
5
5
|
import { R as RuntimeRPC, a as RunnerRPC } from './rpc.d.RH3apGEf.js';
|
|
6
6
|
|
|
@@ -201,6 +201,7 @@ interface WorkerExecuteContext {
|
|
|
201
201
|
files: FileSpecification[];
|
|
202
202
|
providedContext: Record<string, any>;
|
|
203
203
|
invalidates?: string[];
|
|
204
|
+
environment: ContextTestEnvironment;
|
|
204
205
|
/** Exposed to test runner as `VITEST_WORKER_ID`. Value is unique per each isolated worker. */
|
|
205
206
|
workerId: number;
|
|
206
207
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as createCLI } from './chunks/cac.
|
|
1
|
+
import { c as createCLI } from './chunks/cac.DVeoLl0M.js';
|
|
2
2
|
import '@vitest/utils/helpers';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'pathe';
|
|
5
5
|
import 'tinyrainbow';
|
|
6
6
|
import './chunks/constants.D_Q9UYh-.js';
|
|
7
|
-
import './chunks/index.
|
|
7
|
+
import './chunks/index.M8mOzt4Y.js';
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
import 'node:fs/promises';
|
|
10
10
|
import 'node:perf_hooks';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HookHandler, ConfigEnv, UserConfig } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { I as InlineConfig, c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport } from './chunks/reporters.d.
|
|
4
|
-
export { b as TestProjectConfiguration, g as TestProjectInlineConfiguration, f as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.
|
|
5
|
-
import { V as VitestPluginContext } from './chunks/plugin.d.
|
|
6
|
-
import { F as FakeTimerInstallOpts } from './chunks/config.d.
|
|
3
|
+
import { I as InlineConfig, c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport } from './chunks/reporters.d.CWXNI2jG.js';
|
|
4
|
+
export { b as TestProjectConfiguration, g as TestProjectInlineConfiguration, f as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.CWXNI2jG.js';
|
|
5
|
+
import { V as VitestPluginContext } from './chunks/plugin.d.CtqpEehP.js';
|
|
6
|
+
import { F as FakeTimerInstallOpts } from './chunks/config.d.Cy95HiCx.js';
|
|
7
7
|
import '@vitest/runner';
|
|
8
8
|
import '@vitest/utils';
|
|
9
9
|
import './chunks/rpc.d.RH3apGEf.js';
|
|
@@ -11,8 +11,8 @@ import '@vitest/snapshot';
|
|
|
11
11
|
import 'vite/module-runner';
|
|
12
12
|
import './chunks/traces.d.402V_yFI.js';
|
|
13
13
|
import 'node:stream';
|
|
14
|
-
import './chunks/browser.d.
|
|
15
|
-
import './chunks/worker.d.
|
|
14
|
+
import './chunks/browser.d.ChKACdzH.js';
|
|
15
|
+
import './chunks/worker.d.Dyxm8DEL.js';
|
|
16
16
|
import './chunks/environment.d.CrsxCzP1.js';
|
|
17
17
|
import '@vitest/mocker';
|
|
18
18
|
import '@vitest/utils/source-map';
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.
|
|
1
|
+
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.CWXNI2jG.js';
|
|
2
2
|
import { TransformResult } from 'vite';
|
|
3
3
|
import { A as AfterSuiteRunMeta } from './chunks/rpc.d.RH3apGEf.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import '@vitest/utils';
|
|
6
6
|
import 'node:stream';
|
|
7
|
-
import './chunks/browser.d.
|
|
8
|
-
import './chunks/
|
|
7
|
+
import './chunks/browser.d.ChKACdzH.js';
|
|
8
|
+
import './chunks/traces.d.402V_yFI.js';
|
|
9
|
+
import './chunks/worker.d.Dyxm8DEL.js';
|
|
9
10
|
import 'vite/module-runner';
|
|
10
|
-
import './chunks/config.d.
|
|
11
|
+
import './chunks/config.d.Cy95HiCx.js';
|
|
11
12
|
import '@vitest/pretty-format';
|
|
12
13
|
import '@vitest/snapshot';
|
|
13
14
|
import '@vitest/utils/diff';
|
|
@@ -17,7 +18,6 @@ import '@vitest/utils/source-map';
|
|
|
17
18
|
import 'vitest/browser';
|
|
18
19
|
import '@vitest/expect';
|
|
19
20
|
import 'vitest/optional-types.js';
|
|
20
|
-
import './chunks/traces.d.402V_yFI.js';
|
|
21
21
|
import './chunks/benchmark.d.DAaHLpsq.js';
|
|
22
22
|
import '@vitest/runner/utils';
|
|
23
23
|
import 'tinybench';
|
package/dist/coverage.js
CHANGED
package/dist/environments.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { M as ModuleDefinitionDurationsDiagnostic, U as UntrackedModuleDefinitionDiagnostic, S as SerializedTestSpecification, a as ModuleDefinitionDiagnostic, b as ModuleDefinitionLocation, c as SourceModuleDiagnostic, d as SourceModuleLocations } from './chunks/browser.d.
|
|
2
|
-
export { B as BrowserTesterOptions } from './chunks/browser.d.
|
|
1
|
+
import { M as ModuleDefinitionDurationsDiagnostic, U as UntrackedModuleDefinitionDiagnostic, S as SerializedTestSpecification, a as ModuleDefinitionDiagnostic, b as ModuleDefinitionLocation, c as SourceModuleDiagnostic, d as SourceModuleLocations } from './chunks/browser.d.ChKACdzH.js';
|
|
2
|
+
export { B as BrowserTesterOptions } from './chunks/browser.d.ChKACdzH.js';
|
|
3
3
|
import './chunks/global.d.B15mdLcR.js';
|
|
4
4
|
import { File, TestAnnotation, TestArtifact, TaskResultPack, TaskEventPack, Test, TaskPopulated } from '@vitest/runner';
|
|
5
5
|
export { CancelReason, ImportDuration, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskEventPack as RunnerTaskEventPack, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestAnnotation, TestAnnotationArtifact, TestArtifact, TestArtifactBase, TestArtifactLocation, TestArtifactRegistry, TestAttachment, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, recordArtifact, suite, test } from '@vitest/runner';
|
|
6
6
|
import { Awaitable } from '@vitest/utils';
|
|
7
7
|
export { ParsedStack, SerializedError, TestError } from '@vitest/utils';
|
|
8
|
-
import { b as BirpcReturn } from './chunks/worker.d.
|
|
9
|
-
export { C as ContextRPC, c as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.
|
|
10
|
-
import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.
|
|
11
|
-
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.d.
|
|
8
|
+
import { b as BirpcReturn } from './chunks/worker.d.Dyxm8DEL.js';
|
|
9
|
+
export { C as ContextRPC, c as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.Dyxm8DEL.js';
|
|
10
|
+
import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.Cy95HiCx.js';
|
|
11
|
+
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.d.Cy95HiCx.js';
|
|
12
12
|
import { U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, P as ProvidedContext } from './chunks/rpc.d.RH3apGEf.js';
|
|
13
13
|
export { A as AfterSuiteRunMeta, a as RunnerRPC, R as RuntimeRPC } from './chunks/rpc.d.RH3apGEf.js';
|
|
14
14
|
import { ExpectStatic } from '@vitest/expect';
|
|
@@ -22,10 +22,10 @@ export { ExpectTypeOf, expectTypeOf } from 'expect-type';
|
|
|
22
22
|
export { SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotSerializer, SnapshotStateOptions, SnapshotSummary, SnapshotUpdateState, UncheckedSnapshot } from '@vitest/snapshot';
|
|
23
23
|
export { DiffOptions } from '@vitest/utils/diff';
|
|
24
24
|
export { Bench as BenchFactory, Options as BenchOptions, Task as BenchTask, TaskResult as BenchTaskResult } from 'tinybench';
|
|
25
|
+
import './chunks/traces.d.402V_yFI.js';
|
|
25
26
|
import '@vitest/pretty-format';
|
|
26
27
|
import 'vite/module-runner';
|
|
27
28
|
import './chunks/environment.d.CrsxCzP1.js';
|
|
28
|
-
import './chunks/traces.d.402V_yFI.js';
|
|
29
29
|
import '@vitest/runner/utils';
|
|
30
30
|
|
|
31
31
|
interface SourceMap {
|
package/dist/module-evaluator.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { isBuiltin, createRequire } from 'node:module';
|
|
2
2
|
import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
3
3
|
import vm from 'node:vm';
|
|
4
|
-
import { isAbsolute } from 'pathe';
|
|
5
4
|
import { ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey } from 'vite/module-runner';
|
|
6
|
-
import { T as Traces } from './chunks/traces.
|
|
5
|
+
import { T as Traces } from './chunks/traces.CCmnQaNT.js';
|
|
7
6
|
|
|
8
7
|
const performanceNow = performance.now.bind(performance);
|
|
9
8
|
class ModuleDebug {
|
|
@@ -163,7 +162,7 @@ class VitestModuleEvaluator {
|
|
|
163
162
|
const filename = meta.filename;
|
|
164
163
|
const dirname = meta.dirname;
|
|
165
164
|
span.setAttributes({ "code.file.path": filename });
|
|
166
|
-
const require = this.createRequire(
|
|
165
|
+
const require = this.createRequire(meta.url);
|
|
167
166
|
const argumentsList = [
|
|
168
167
|
ssrModuleExportsKey,
|
|
169
168
|
ssrImportMetaKey,
|
|
@@ -220,9 +219,6 @@ class VitestModuleEvaluator {
|
|
|
220
219
|
}
|
|
221
220
|
}
|
|
222
221
|
createRequire(filename) {
|
|
223
|
-
// \x00 is a rollup convention for virtual files,
|
|
224
|
-
// it is not allowed in actual file names
|
|
225
|
-
if (filename[0] === "\0" || !isAbsolute(filename)) return () => ({});
|
|
226
222
|
return this.vm ? this.vm.externalModulesExecutor.createRequire(filename) : createRequire(filename);
|
|
227
223
|
}
|
|
228
224
|
shouldInterop(path, mod) {
|
package/dist/module-runner.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { VitestModuleEvaluator } from './module-evaluator.js';
|
|
2
|
-
export { a as VITEST_VM_CONTEXT_SYMBOL, V as VitestModuleRunner, s as startVitestModuleRunner } from './chunks/startModuleRunner.
|
|
2
|
+
export { a as VITEST_VM_CONTEXT_SYMBOL, V as VitestModuleRunner, s as startVitestModuleRunner } from './chunks/startModuleRunner.DEj0jb3e.js';
|
|
3
3
|
export { g as getWorkerState } from './chunks/utils.DvEY5TfP.js';
|
|
4
4
|
import 'node:module';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:vm';
|
|
7
|
-
import 'pathe';
|
|
8
7
|
import 'vite/module-runner';
|
|
9
|
-
import './chunks/traces.
|
|
8
|
+
import './chunks/traces.CCmnQaNT.js';
|
|
10
9
|
import 'node:fs';
|
|
11
10
|
import '@vitest/utils/helpers';
|
|
12
11
|
import './chunks/modules.BJuCwlRJ.js';
|
|
12
|
+
import 'pathe';
|
|
13
13
|
import './path.js';
|
|
14
14
|
import 'node:path';
|
|
15
15
|
import '@vitest/utils/serialize';
|
package/dist/node.d.ts
CHANGED
|
@@ -3,21 +3,22 @@ import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as Res
|
|
|
3
3
|
export { vite as Vite };
|
|
4
4
|
export { esbuildVersion, isCSSRequest, isFileLoadingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
5
5
|
import { IncomingMessage } from 'node:http';
|
|
6
|
-
import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, k as TestSpecification, T as TestProject, P as PoolWorker, l as PoolOptions, m as WorkerRequest, n as TestSequencer, L as Logger } from './chunks/reporters.d.
|
|
7
|
-
export { at as BaseCoverageOptions, Y as BenchmarkUserOptions, Z as BrowserBuiltinProvider, $ as BrowserCommand, a0 as BrowserCommandContext, a1 as BrowserConfigOptions, a2 as BrowserInstanceOption, a3 as BrowserModuleMocker, a4 as BrowserOrchestrator, a5 as BrowserProvider, a6 as BrowserProviderOption, a7 as BrowserScript, a8 as BrowserServerFactory, a9 as BrowserServerOptions, aa as BrowserServerState, ab as BrowserServerStateSession, ai as BuiltinEnvironment, ac as CDPSession, aj as CSSModuleScopeStrategy, au as CoverageIstanbulOptions, av as CoverageOptions, aw as CoverageProvider, ax as CoverageProviderModule, ay as CoverageReporter, c as CoverageV8Options, az as CustomProviderOptions, ak as DepsOptimizationOptions, al as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, t as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, o as OnTestsRerunHandler, ad as ParentProjectBrowser, am as Pool, q as PoolRunnerInitializer, r as PoolTask, ae as ProjectBrowser, an as ProjectConfig, a as ReportContext, aB as ReportedHookContext, aC as Reporter, ap as ResolveSnapshotPathHandler, aq as ResolveSnapshotPathHandlerContext, af as ResolvedBrowserOptions, R as ResolvedCoverageOptions, ao as ResolvedProjectConfig, S as SerializedTestProject, u as TaskOptions, v as TestCase, w as TestCollection, x as TestDiagnostic, y as TestModule, z as TestModuleState, B as TestResult, D as TestResultFailed, E as TestResultPassed, F as TestResultSkipped, aD as TestRunEndReason, aA as TestRunResult, X as TestSequencerConstructor, G as TestState, K as TestSuite, N as TestSuiteState, ag as ToMatchScreenshotComparators, ah as ToMatchScreenshotOptions, ar as TypecheckConfig, U as UserWorkspaceConfig, as as VitestEnvironment, p as VitestPackageInstaller, W as WatcherTriggerPattern, s as WorkerResponse, _ as _BrowserNames, Q as experimental_getRunnerTask } from './chunks/reporters.d.
|
|
8
|
-
export { C as CacheKeyIdGenerator, a as CacheKeyIdGeneratorContext, V as VitestPluginContext } from './chunks/plugin.d.
|
|
6
|
+
import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, k as TestSpecification, T as TestProject, P as PoolWorker, l as PoolOptions, m as WorkerRequest, n as TestSequencer, L as Logger } from './chunks/reporters.d.CWXNI2jG.js';
|
|
7
|
+
export { at as BaseCoverageOptions, Y as BenchmarkUserOptions, Z as BrowserBuiltinProvider, $ as BrowserCommand, a0 as BrowserCommandContext, a1 as BrowserConfigOptions, a2 as BrowserInstanceOption, a3 as BrowserModuleMocker, a4 as BrowserOrchestrator, a5 as BrowserProvider, a6 as BrowserProviderOption, a7 as BrowserScript, a8 as BrowserServerFactory, a9 as BrowserServerOptions, aa as BrowserServerState, ab as BrowserServerStateSession, ai as BuiltinEnvironment, ac as CDPSession, aj as CSSModuleScopeStrategy, au as CoverageIstanbulOptions, av as CoverageOptions, aw as CoverageProvider, ax as CoverageProviderModule, ay as CoverageReporter, c as CoverageV8Options, az as CustomProviderOptions, ak as DepsOptimizationOptions, al as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, t as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, o as OnTestsRerunHandler, ad as ParentProjectBrowser, am as Pool, q as PoolRunnerInitializer, r as PoolTask, ae as ProjectBrowser, an as ProjectConfig, a as ReportContext, aB as ReportedHookContext, aC as Reporter, ap as ResolveSnapshotPathHandler, aq as ResolveSnapshotPathHandlerContext, af as ResolvedBrowserOptions, R as ResolvedCoverageOptions, ao as ResolvedProjectConfig, S as SerializedTestProject, u as TaskOptions, v as TestCase, w as TestCollection, x as TestDiagnostic, y as TestModule, z as TestModuleState, B as TestResult, D as TestResultFailed, E as TestResultPassed, F as TestResultSkipped, aD as TestRunEndReason, aA as TestRunResult, X as TestSequencerConstructor, G as TestState, K as TestSuite, N as TestSuiteState, ag as ToMatchScreenshotComparators, ah as ToMatchScreenshotOptions, ar as TypecheckConfig, U as UserWorkspaceConfig, as as VitestEnvironment, p as VitestPackageInstaller, W as WatcherTriggerPattern, s as WorkerResponse, _ as _BrowserNames, Q as experimental_getRunnerTask } from './chunks/reporters.d.CWXNI2jG.js';
|
|
8
|
+
export { C as CacheKeyIdGenerator, a as CacheKeyIdGeneratorContext, V as VitestPluginContext } from './chunks/plugin.d.CtqpEehP.js';
|
|
9
9
|
import { Awaitable } from '@vitest/utils';
|
|
10
10
|
export { SerializedError } from '@vitest/utils';
|
|
11
11
|
import { R as RuntimeRPC } from './chunks/rpc.d.RH3apGEf.js';
|
|
12
12
|
import { Writable } from 'node:stream';
|
|
13
|
-
import { C as ContextRPC } from './chunks/worker.d.
|
|
14
|
-
export { T as TestExecutionType } from './chunks/worker.d.
|
|
13
|
+
import { C as ContextRPC } from './chunks/worker.d.Dyxm8DEL.js';
|
|
14
|
+
export { T as TestExecutionType } from './chunks/worker.d.Dyxm8DEL.js';
|
|
15
15
|
import { Debugger } from 'obug';
|
|
16
16
|
import './chunks/global.d.B15mdLcR.js';
|
|
17
17
|
export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
18
|
-
export { b as RuntimeConfig } from './chunks/config.d.
|
|
18
|
+
export { b as RuntimeConfig } from './chunks/config.d.Cy95HiCx.js';
|
|
19
19
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
20
|
-
import './chunks/browser.d.
|
|
20
|
+
import './chunks/browser.d.ChKACdzH.js';
|
|
21
|
+
import './chunks/traces.d.402V_yFI.js';
|
|
21
22
|
import '@vitest/mocker';
|
|
22
23
|
import '@vitest/utils/source-map';
|
|
23
24
|
import 'vitest/browser';
|
|
@@ -26,7 +27,6 @@ import '@vitest/snapshot';
|
|
|
26
27
|
import '@vitest/utils/diff';
|
|
27
28
|
import '@vitest/expect';
|
|
28
29
|
import 'vitest/optional-types.js';
|
|
29
|
-
import './chunks/traces.d.402V_yFI.js';
|
|
30
30
|
import './chunks/benchmark.d.DAaHLpsq.js';
|
|
31
31
|
import 'tinybench';
|
|
32
32
|
import './chunks/coverage.d.BZtK59WP.js';
|
|
@@ -203,6 +203,7 @@ declare class VmForksPoolWorker extends ForksPoolWorker {
|
|
|
203
203
|
readonly reportMemory: true;
|
|
204
204
|
protected readonly entrypoint: string;
|
|
205
205
|
constructor(options: PoolOptions);
|
|
206
|
+
canReuse(): boolean;
|
|
206
207
|
}
|
|
207
208
|
|
|
208
209
|
/** @experimental */
|
|
@@ -211,6 +212,7 @@ declare class VmThreadsPoolWorker extends ThreadsPoolWorker {
|
|
|
211
212
|
readonly reportMemory: true;
|
|
212
213
|
protected readonly entrypoint: string;
|
|
213
214
|
constructor(options: PoolOptions);
|
|
215
|
+
canReuse(): boolean;
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
declare class BaseSequencer implements TestSequencer {
|