vitest 4.0.5 → 4.0.7
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 +3 -3
- package/dist/chunks/{base.RFExFinv.js → base.D3GxgUMI.js} +43 -50
- package/dist/chunks/{browser.d.B9iJzZyn.d.ts → browser.d.-LKfRopd.d.ts} +1 -1
- package/dist/chunks/{cac.Be29vze6.js → cac.G9DAn-c7.js} +8 -7
- package/dist/chunks/{cli-api.6GYRwzrM.js → cli-api.Csks4as1.js} +32 -28
- package/dist/chunks/{config.d.u2CUDWwS.d.ts → config.d.BTfZNUu9.d.ts} +0 -1
- package/dist/chunks/{coverage.DT47gDHj.js → coverage.C2LA1DSL.js} +17 -14
- package/dist/chunks/{global.d.BgJSTpgQ.d.ts → global.d.DxtanrNO.d.ts} +1 -1
- package/dist/chunks/{index.CcRZ6fUh.js → index.CVpyv-Zg.js} +9 -10
- package/dist/chunks/{index.DON9WL-E.js → index.CWIFvlX5.js} +57 -11
- package/dist/chunks/{resolveSnapshotEnvironment.BZzLjzkh.js → index.DEPqWSIZ.js} +12 -12
- package/dist/chunks/{index.BdSLhLDZ.js → index.jMQYiEWE.js} +1 -1
- package/dist/chunks/{init-forks.WSf5dRNP.js → init-forks.IU-xQ2_X.js} +3 -2
- package/dist/chunks/{init-threads.CgZguQvI.js → init-threads.C_NWvZkU.js} +3 -2
- package/dist/chunks/{init.CpZMjXJJ.js → init.fmH9J833.js} +85 -38
- package/dist/chunks/{moduleRunner.d.YtNsMIoJ.d.ts → moduleRunner.d.DEkTotCv.d.ts} +1 -1
- package/dist/chunks/{plugin.d.D8LgBgbU.d.ts → plugin.d.Cpes8Bt6.d.ts} +1 -1
- package/dist/chunks/{reporters.d.D-el0219.d.ts → reporters.d.CSNcMDxF.d.ts} +17 -9
- package/dist/chunks/{rpc.Dv1Jt3i2.js → rpc.D38ahn14.js} +8 -11
- package/dist/chunks/{startModuleRunner.BqQUfEjB.js → startModuleRunner.Cn7hCL7D.js} +36 -26
- package/dist/chunks/{test.CnspO-X4.js → test.B6aJd6T3.js} +1 -1
- package/dist/chunks/{vm.CqZQkf-M.js → vm.BL7_zzOr.js} +6 -5
- package/dist/chunks/{worker.d.BFk-vvBU.d.ts → worker.d.D25zYZ7N.d.ts} +23 -5
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +6 -6
- package/dist/coverage.d.ts +4 -4
- package/dist/coverage.js +1 -1
- package/dist/environments.js +2 -1
- package/dist/index.d.ts +8 -8
- package/dist/module-evaluator.d.ts +3 -3
- package/dist/module-runner.js +1 -1
- package/dist/node.d.ts +8 -8
- package/dist/node.js +7 -7
- package/dist/reporters.d.ts +4 -4
- package/dist/reporters.js +2 -2
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +2 -2
- package/dist/worker.d.ts +3 -2
- package/dist/worker.js +21 -21
- package/dist/workers/forks.js +27 -24
- package/dist/workers/runVmTests.js +4 -4
- package/dist/workers/threads.js +27 -24
- package/dist/workers/vmForks.js +10 -10
- package/dist/workers/vmThreads.js +10 -10
- package/package.json +12 -12
|
@@ -11,6 +11,27 @@ import vm from 'node:vm';
|
|
|
11
11
|
import { MockerRegistry, mockObject, RedirectedModule, AutomockedModule } from '@vitest/mocker';
|
|
12
12
|
import * as viteModuleRunner from 'vite/module-runner';
|
|
13
13
|
|
|
14
|
+
class VitestTransport {
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.options = options;
|
|
17
|
+
}
|
|
18
|
+
async invoke(event) {
|
|
19
|
+
if (event.type !== "custom") return { error: /* @__PURE__ */ new Error(`Vitest Module Runner doesn't support Vite HMR events.`) };
|
|
20
|
+
if (event.event !== "vite:invoke") return { error: /* @__PURE__ */ new Error(`Vitest Module Runner doesn't support ${event.event} event.`) };
|
|
21
|
+
const { name, data } = event.data;
|
|
22
|
+
if (name === "getBuiltins")
|
|
23
|
+
// we return an empty array here to avoid client-side builtin check,
|
|
24
|
+
// as we need builtins to go through `fetchModule`
|
|
25
|
+
return { result: [] };
|
|
26
|
+
if (name !== "fetchModule") return { error: /* @__PURE__ */ new Error(`Unknown method: ${name}. Expected "fetchModule".`) };
|
|
27
|
+
try {
|
|
28
|
+
return { result: await this.options.fetchModule(...data) };
|
|
29
|
+
} catch (error) {
|
|
30
|
+
return { error };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
14
35
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
15
36
|
function normalizeWindowsPath(input = "") {
|
|
16
37
|
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
@@ -428,27 +449,6 @@ function fixLeadingSlashes(id) {
|
|
|
428
449
|
return id.startsWith("//") ? id.replace(multipleSlashRe, "/") : id;
|
|
429
450
|
}
|
|
430
451
|
|
|
431
|
-
class VitestTransport {
|
|
432
|
-
constructor(options) {
|
|
433
|
-
this.options = options;
|
|
434
|
-
}
|
|
435
|
-
async invoke(event) {
|
|
436
|
-
if (event.type !== "custom") return { error: /* @__PURE__ */ new Error(`Vitest Module Runner doesn't support Vite HMR events.`) };
|
|
437
|
-
if (event.event !== "vite:invoke") return { error: /* @__PURE__ */ new Error(`Vitest Module Runner doesn't support ${event.event} event.`) };
|
|
438
|
-
const { name, data } = event.data;
|
|
439
|
-
if (name === "getBuiltins")
|
|
440
|
-
// we return an empty array here to avoid client-side builtin check,
|
|
441
|
-
// as we need builtins to go through `fetchModule`
|
|
442
|
-
return { result: [] };
|
|
443
|
-
if (name !== "fetchModule") return { error: /* @__PURE__ */ new Error(`Unknown method: ${name}. Expected "fetchModule".`) };
|
|
444
|
-
try {
|
|
445
|
-
return { result: await this.options.fetchModule(...data) };
|
|
446
|
-
} catch (error) {
|
|
447
|
-
return { error };
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
452
|
const createNodeImportMeta = (modulePath) => {
|
|
453
453
|
if (!viteModuleRunner.createDefaultImportMeta) throw new Error(`createNodeImportMeta is not supported in this version of Vite.`);
|
|
454
454
|
const defaultMeta = viteModuleRunner.createDefaultImportMeta(modulePath), href = defaultMeta.url, importMetaResolver = createImportMetaResolver();
|
|
@@ -495,6 +495,16 @@ class VitestModuleRunner extends viteModuleRunner.ModuleRunner {
|
|
|
495
495
|
value: this.mocker
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Vite checks that the module has exports emulating the Node.js behaviour,
|
|
500
|
+
* but Vitest is more relaxed.
|
|
501
|
+
*
|
|
502
|
+
* We should keep the Vite behavour when there is a `strict` flag.
|
|
503
|
+
* @internal
|
|
504
|
+
*/
|
|
505
|
+
processImport(exports) {
|
|
506
|
+
return exports;
|
|
507
|
+
}
|
|
498
508
|
async import(rawId) {
|
|
499
509
|
const resolved = await this.vitestOptions.transport.resolveId(rawId);
|
|
500
510
|
return super.import(resolved ? resolved.url : rawId);
|
|
@@ -565,24 +575,24 @@ function getCachedVitestImport(id, state) {
|
|
|
565
575
|
}) : null;
|
|
566
576
|
}
|
|
567
577
|
|
|
568
|
-
|
|
578
|
+
// Store globals in case tests overwrite them
|
|
579
|
+
const processListeners = process.listeners.bind(process), processOn = process.on.bind(process), processOff = process.off.bind(process), dispose = [];
|
|
569
580
|
function listenForErrors(state) {
|
|
570
581
|
dispose.forEach((fn) => fn()), dispose.length = 0;
|
|
571
582
|
function catchError(err, type, event) {
|
|
572
583
|
const worker = state();
|
|
573
584
|
// if there is another listener, assume that it's handled by user code
|
|
574
585
|
// one is Vitest's own listener
|
|
575
|
-
if (
|
|
586
|
+
if (processListeners(event).length > 1) return;
|
|
576
587
|
const error = serializeValue(err);
|
|
577
588
|
if (typeof error === "object" && error != null) {
|
|
578
589
|
if (error.VITEST_TEST_NAME = worker.current?.type === "test" ? worker.current.name : void 0, worker.filepath) error.VITEST_TEST_PATH = worker.filepath;
|
|
579
|
-
error.VITEST_AFTER_ENV_TEARDOWN = worker.environmentTeardownRun;
|
|
580
590
|
}
|
|
581
591
|
state().rpc.onUnhandledError(error, type);
|
|
582
592
|
}
|
|
583
593
|
const uncaughtException = (e) => catchError(e, "Uncaught Exception", "uncaughtException"), unhandledRejection = (e) => catchError(e, "Unhandled Rejection", "unhandledRejection");
|
|
584
|
-
|
|
585
|
-
|
|
594
|
+
processOn("uncaughtException", uncaughtException), processOn("unhandledRejection", unhandledRejection), dispose.push(() => {
|
|
595
|
+
processOff("uncaughtException", uncaughtException), processOff("unhandledRejection", unhandledRejection);
|
|
586
596
|
});
|
|
587
597
|
}
|
|
588
598
|
|
|
@@ -8,7 +8,7 @@ import { getTests, getNames, getTestName } from '@vitest/runner/utils';
|
|
|
8
8
|
import { processError } from '@vitest/utils/error';
|
|
9
9
|
import { normalize } from 'pathe';
|
|
10
10
|
import { a as getSnapshotClient, i as inject, c as createExpect, v as vi } from './vi.BZvkKVkM.js';
|
|
11
|
-
import { r as rpc } from './rpc.
|
|
11
|
+
import { r as rpc } from './rpc.D38ahn14.js';
|
|
12
12
|
|
|
13
13
|
function createBenchmarkResult(name) {
|
|
14
14
|
return {
|
|
@@ -1,6 +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.fmH9J833.js';
|
|
4
5
|
import { distDir } from '../path.js';
|
|
5
6
|
import { createCustomConsole } from './console.CTJL2nuH.js';
|
|
6
7
|
import fs from 'node:fs';
|
|
@@ -10,7 +11,7 @@ import { findNearestPackageData } from '@vitest/utils/resolver';
|
|
|
10
11
|
import { dirname as dirname$1 } from 'node:path';
|
|
11
12
|
import { CSS_LANGS_RE, KNOWN_ASSET_RE } from '@vitest/utils/constants';
|
|
12
13
|
import { getDefaultRequestStubs } from '../module-evaluator.js';
|
|
13
|
-
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.Cn7hCL7D.js';
|
|
14
15
|
import { p as provideWorkerState } from './utils.CG9h5ccR.js';
|
|
15
16
|
|
|
16
17
|
function interopCommonJsModule(interopDefault, mod) {
|
|
@@ -585,13 +586,13 @@ class FileMap {
|
|
|
585
586
|
|
|
586
587
|
const entryFile = pathToFileURL(resolve(distDir, "workers/runVmTests.js")).href, fileMap = new FileMap(), packageCache = /* @__PURE__ */ new Map();
|
|
587
588
|
async function runVmTests(method, state) {
|
|
588
|
-
const {
|
|
589
|
-
if (!environment.setupVM) {
|
|
589
|
+
const { ctx, rpc } = state, beforeEnvironmentTime = performance.now(), { environment } = await loadEnvironment(ctx.environment.name, ctx.config.root, rpc);
|
|
590
|
+
if (state.environment = environment, !environment.setupVM) {
|
|
590
591
|
const envName = ctx.environment.name, packageId = envName[0] === "." ? envName : `vitest-environment-${envName}`;
|
|
591
592
|
throw new TypeError(`Environment "${ctx.environment.name}" is not a valid environment. Path "${packageId}" doesn't support vm environment because it doesn't provide "setupVM" method.`);
|
|
592
593
|
}
|
|
593
594
|
const vm = await environment.setupVM(ctx.environment.options || ctx.config.environmentOptions || {});
|
|
594
|
-
if (state.durations.environment = performance.now() -
|
|
595
|
+
if (state.durations.environment = performance.now() - beforeEnvironmentTime, process.env.VITEST_VM_POOL = "1", !vm.getVmContext) throw new TypeError(`Environment ${environment.name} doesn't provide "getVmContext" method. It should return a context created by "vm.createContext" method.`);
|
|
595
596
|
const context = vm.getVmContext();
|
|
596
597
|
if (!isContext(context)) throw new TypeError(`Environment ${environment.name} doesn't provide a valid context. It should be created by "vm.createContext" method.`);
|
|
597
598
|
provideWorkerState(context, state), context.process = process, context.global = context, context.console = state.config.disableConsoleIntercept ? console : createCustomConsole(state), context.setImmediate = setImmediate, context.clearImmediate = clearImmediate;
|
|
@@ -629,7 +630,7 @@ async function runVmTests(method, state) {
|
|
|
629
630
|
try {
|
|
630
631
|
await run(method, fileSpecs, ctx.config, moduleRunner);
|
|
631
632
|
} finally {
|
|
632
|
-
await vm.teardown?.()
|
|
633
|
+
await vm.teardown?.();
|
|
633
634
|
}
|
|
634
635
|
}
|
|
635
636
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CancelReason, File, TestAnnotation, TaskResultPack, TaskEventPack, FileSpecification, Task } from '@vitest/runner';
|
|
2
2
|
import { FetchFunctionOptions, FetchResult, EvaluatedModules } from 'vite/module-runner';
|
|
3
|
-
import { S as SerializedConfig } from './config.d.
|
|
3
|
+
import { S as SerializedConfig } from './config.d.BTfZNUu9.js';
|
|
4
4
|
import { E as Environment } from './environment.d.CrsxCzP1.js';
|
|
5
5
|
import { SnapshotResult } from '@vitest/snapshot';
|
|
6
6
|
|
|
@@ -167,18 +167,37 @@ interface ContextTestEnvironment {
|
|
|
167
167
|
name: string;
|
|
168
168
|
options: Record<string, any> | null;
|
|
169
169
|
}
|
|
170
|
+
interface WorkerTestEnvironment {
|
|
171
|
+
name: string;
|
|
172
|
+
options: Record<string, any> | null;
|
|
173
|
+
}
|
|
170
174
|
type TestExecutionMethod = "run" | "collect";
|
|
175
|
+
interface WorkerExecuteContext {
|
|
176
|
+
files: FileSpecification[];
|
|
177
|
+
providedContext: Record<string, any>;
|
|
178
|
+
invalidates?: string[];
|
|
179
|
+
/** Exposed to test runner as `VITEST_WORKER_ID`. Value is unique per each isolated worker. */
|
|
180
|
+
workerId: number;
|
|
181
|
+
}
|
|
171
182
|
interface ContextRPC {
|
|
172
183
|
pool: string;
|
|
173
184
|
config: SerializedConfig;
|
|
174
185
|
projectName: string;
|
|
186
|
+
environment: WorkerTestEnvironment;
|
|
187
|
+
rpc: WorkerRPC;
|
|
175
188
|
files: FileSpecification[];
|
|
176
|
-
environment: ContextTestEnvironment;
|
|
177
189
|
providedContext: Record<string, any>;
|
|
178
190
|
invalidates?: string[];
|
|
179
191
|
/** Exposed to test runner as `VITEST_WORKER_ID`. Value is unique per each isolated worker. */
|
|
180
192
|
workerId: number;
|
|
181
193
|
}
|
|
194
|
+
interface WorkerSetupContext {
|
|
195
|
+
environment: WorkerTestEnvironment;
|
|
196
|
+
pool: string;
|
|
197
|
+
config: SerializedConfig;
|
|
198
|
+
projectName: string;
|
|
199
|
+
rpc: WorkerRPC;
|
|
200
|
+
}
|
|
182
201
|
interface WorkerGlobalState {
|
|
183
202
|
ctx: ContextRPC;
|
|
184
203
|
config: SerializedConfig;
|
|
@@ -194,11 +213,10 @@ interface WorkerGlobalState {
|
|
|
194
213
|
SSR: boolean;
|
|
195
214
|
};
|
|
196
215
|
environment: Environment;
|
|
197
|
-
environmentTeardownRun?: boolean;
|
|
198
|
-
onCancel: Promise<CancelReason>;
|
|
199
216
|
evaluatedModules: EvaluatedModules;
|
|
200
217
|
resolvingModules: Set<string>;
|
|
201
218
|
moduleExecutionInfo: Map<string, any>;
|
|
219
|
+
onCancel: (listener: (reason: CancelReason) => unknown) => void;
|
|
202
220
|
onCleanup: (listener: () => unknown) => void;
|
|
203
221
|
providedContext: Record<string, any>;
|
|
204
222
|
durations: {
|
|
@@ -208,4 +226,4 @@ interface WorkerGlobalState {
|
|
|
208
226
|
onFilterStackTrace?: (trace: string) => string;
|
|
209
227
|
}
|
|
210
228
|
|
|
211
|
-
export type { AfterSuiteRunMeta as A, BirpcOptions as B, ContextRPC as C, LabelColor as L, ModuleGraphData as M, ProvidedContext as P, RuntimeRPC as R, TestExecutionMethod as T, UserConsoleLog as U, WorkerGlobalState as W,
|
|
229
|
+
export type { AfterSuiteRunMeta as A, BirpcOptions as B, ContextRPC as C, LabelColor as L, ModuleGraphData as M, ProvidedContext as P, RuntimeRPC as R, TestExecutionMethod as T, UserConsoleLog as U, WorkerGlobalState as W, WorkerSetupContext as a, BirpcReturn as b, RunnerRPC as c, ContextTestEnvironment as d, ResolveFunctionResult as e, WorkerTestEnvironment as f, WorkerExecuteContext as g };
|
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.G9DAn-c7.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.CVpyv-Zg.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,12 +1,12 @@
|
|
|
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 { a 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.CSNcMDxF.js';
|
|
4
|
+
export { a as TestProjectConfiguration, g as TestProjectInlineConfiguration, f as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.CSNcMDxF.js';
|
|
5
|
+
import { V as VitestPluginContext } from './chunks/plugin.d.Cpes8Bt6.js';
|
|
6
|
+
import { F as FakeTimerInstallOpts } from './chunks/config.d.BTfZNUu9.js';
|
|
7
7
|
import '@vitest/runner';
|
|
8
8
|
import '@vitest/utils';
|
|
9
|
-
import './chunks/worker.d.
|
|
9
|
+
import './chunks/worker.d.D25zYZ7N.js';
|
|
10
10
|
import 'vite/module-runner';
|
|
11
11
|
import './chunks/environment.d.CrsxCzP1.js';
|
|
12
12
|
import '@vitest/snapshot';
|
|
@@ -14,7 +14,7 @@ import 'node:stream';
|
|
|
14
14
|
import '@vitest/mocker';
|
|
15
15
|
import '@vitest/utils/source-map';
|
|
16
16
|
import 'vitest/browser';
|
|
17
|
-
import './chunks/browser.d.
|
|
17
|
+
import './chunks/browser.d.-LKfRopd.js';
|
|
18
18
|
import '@vitest/pretty-format';
|
|
19
19
|
import '@vitest/utils/diff';
|
|
20
20
|
import '@vitest/expect';
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, b as ReportContext } from './chunks/reporters.d.
|
|
1
|
+
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, b as ReportContext } from './chunks/reporters.d.CSNcMDxF.js';
|
|
2
2
|
import { TransformResult } from 'vite';
|
|
3
|
-
import { A as AfterSuiteRunMeta } from './chunks/worker.d.
|
|
3
|
+
import { A as AfterSuiteRunMeta } from './chunks/worker.d.D25zYZ7N.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import '@vitest/utils';
|
|
6
6
|
import 'node:stream';
|
|
7
7
|
import '@vitest/mocker';
|
|
8
8
|
import '@vitest/utils/source-map';
|
|
9
9
|
import 'vitest/browser';
|
|
10
|
-
import './chunks/config.d.
|
|
10
|
+
import './chunks/config.d.BTfZNUu9.js';
|
|
11
11
|
import '@vitest/pretty-format';
|
|
12
12
|
import '@vitest/snapshot';
|
|
13
13
|
import '@vitest/utils/diff';
|
|
14
|
-
import './chunks/browser.d.
|
|
14
|
+
import './chunks/browser.d.-LKfRopd.js';
|
|
15
15
|
import '@vitest/expect';
|
|
16
16
|
import 'vitest/optional-types.js';
|
|
17
17
|
import './chunks/benchmark.d.DAaHLpsq.js';
|
package/dist/coverage.js
CHANGED
package/dist/environments.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { S as SerializedTestSpecification } from './chunks/browser.d.
|
|
2
|
-
export { B as BrowserTesterOptions } from './chunks/browser.d.
|
|
3
|
-
import './chunks/global.d.
|
|
1
|
+
import { S as SerializedTestSpecification } from './chunks/browser.d.-LKfRopd.js';
|
|
2
|
+
export { B as BrowserTesterOptions } from './chunks/browser.d.-LKfRopd.js';
|
|
3
|
+
import './chunks/global.d.DxtanrNO.js';
|
|
4
4
|
import { File, TestAnnotation, TaskResultPack, TaskEventPack, 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, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
6
6
|
import { Awaitable } from '@vitest/utils';
|
|
7
7
|
export { ParsedStack, SerializedError, TestError } from '@vitest/utils';
|
|
8
|
-
import { U as UserConsoleLog, L as LabelColor, M as ModuleGraphData,
|
|
9
|
-
export { A as AfterSuiteRunMeta, C as ContextRPC,
|
|
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 { U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, b as BirpcReturn, P as ProvidedContext } from './chunks/worker.d.D25zYZ7N.js';
|
|
9
|
+
export { A as AfterSuiteRunMeta, C as ContextRPC, d as ContextTestEnvironment, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.D25zYZ7N.js';
|
|
10
|
+
import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.BTfZNUu9.js';
|
|
11
|
+
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.d.BTfZNUu9.js';
|
|
12
12
|
import { ExpectStatic } from '@vitest/expect';
|
|
13
13
|
export { Assertion, AsymmetricMatchersContaining, DeeplyAllowMatchers, ExpectPollOptions, ExpectStatic, JestAssertion, Matchers, chai } from '@vitest/expect';
|
|
14
14
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
15
|
-
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject } from '@vitest/spy';
|
|
15
|
+
export { Mock, MockContext, MockInstance, MockResult, MockResultIncomplete, MockResultReturn, MockResultThrow, MockSettledResult, MockSettledResultFulfilled, MockSettledResultIncomplete, MockSettledResultRejected, Mocked, MockedClass, MockedFunction, MockedObject } from '@vitest/spy';
|
|
16
16
|
import { M as MockFactoryWithHelper, a as MockOptions } from './chunks/mocker.d.BE_2ls6u.js';
|
|
17
17
|
export { b as bench } from './chunks/suite.d.BJWk38HB.js';
|
|
18
18
|
import { EvaluatedModules } from 'vite/module-runner';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'vite/module-runner';
|
|
2
|
-
export { b as VitestModuleEvaluator, a as VitestModuleEvaluatorOptions, c as createImportMetaEnvProxy, g as getDefaultRequestStubs, i as isPrimitive, u as unwrapId, w as wrapId } from './chunks/moduleRunner.d.
|
|
2
|
+
export { b as VitestModuleEvaluator, a as VitestModuleEvaluatorOptions, c as createImportMetaEnvProxy, g as getDefaultRequestStubs, i as isPrimitive, u as unwrapId, w as wrapId } from './chunks/moduleRunner.d.DEkTotCv.js';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import '@vitest/spy';
|
|
5
|
-
import './chunks/worker.d.
|
|
5
|
+
import './chunks/worker.d.D25zYZ7N.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
|
-
import './chunks/config.d.
|
|
7
|
+
import './chunks/config.d.BTfZNUu9.js';
|
|
8
8
|
import '@vitest/pretty-format';
|
|
9
9
|
import '@vitest/snapshot';
|
|
10
10
|
import '@vitest/utils/diff';
|
package/dist/module-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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.Cn7hCL7D.js';
|
|
3
3
|
export { g as getWorkerState } from './chunks/utils.CG9h5ccR.js';
|
|
4
4
|
import 'node:module';
|
|
5
5
|
import 'node:url';
|
package/dist/node.d.ts
CHANGED
|
@@ -3,23 +3,23 @@ import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as Res
|
|
|
3
3
|
export { vite as Vite };
|
|
4
4
|
export { esbuildVersion, isCSSRequest, isFileServingAllowed, 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, b 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.
|
|
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.CSNcMDxF.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, b 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.CSNcMDxF.js';
|
|
8
8
|
import { Awaitable } from '@vitest/utils';
|
|
9
9
|
export { SerializedError } from '@vitest/utils';
|
|
10
|
-
import { R as RuntimeRPC, C as ContextRPC } from './chunks/worker.d.
|
|
11
|
-
export { T as TestExecutionType } from './chunks/worker.d.
|
|
10
|
+
import { R as RuntimeRPC, C as ContextRPC } from './chunks/worker.d.D25zYZ7N.js';
|
|
11
|
+
export { T as TestExecutionType } from './chunks/worker.d.D25zYZ7N.js';
|
|
12
12
|
import { Writable } from 'node:stream';
|
|
13
|
-
export { V as VitestPluginContext } from './chunks/plugin.d.
|
|
13
|
+
export { V as VitestPluginContext } from './chunks/plugin.d.Cpes8Bt6.js';
|
|
14
14
|
import { Debugger } from 'debug';
|
|
15
|
-
import './chunks/global.d.
|
|
15
|
+
import './chunks/global.d.DxtanrNO.js';
|
|
16
16
|
export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
17
|
-
export { b as RuntimeConfig } from './chunks/config.d.
|
|
17
|
+
export { b as RuntimeConfig } from './chunks/config.d.BTfZNUu9.js';
|
|
18
18
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
19
19
|
import '@vitest/mocker';
|
|
20
20
|
import '@vitest/utils/source-map';
|
|
21
21
|
import 'vitest/browser';
|
|
22
|
-
import './chunks/browser.d.
|
|
22
|
+
import './chunks/browser.d.-LKfRopd.js';
|
|
23
23
|
import '@vitest/pretty-format';
|
|
24
24
|
import '@vitest/snapshot';
|
|
25
25
|
import '@vitest/utils/diff';
|
package/dist/node.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import { resolveConfig as resolveConfig$1, mergeConfig } from 'vite';
|
|
3
3
|
export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
4
|
-
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.
|
|
5
|
-
export { f as ForksPoolWorker, G as GitNotFoundError, F as TestsNotFoundError, T as ThreadsPoolWorker, h as TypecheckPoolWorker, b as VitestPackageInstaller, j as VmForksPoolWorker, k as VmThreadsPoolWorker, o as createDebugger, d as createMethodsRPC, n as createViteLogger, c as createVitest, e as escapeTestName, l as experimental_getRunnerTask, g as getFilePoolName, i as isValidApiRequest, m as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.
|
|
6
|
-
export { p as parseCLI } from './chunks/cac.
|
|
7
|
-
import { r as resolveConfig$2 } from './chunks/coverage.
|
|
8
|
-
export { b as BaseSequencer, a as resolveApiServerConfig } from './chunks/coverage.
|
|
4
|
+
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.Csks4as1.js';
|
|
5
|
+
export { f as ForksPoolWorker, G as GitNotFoundError, F as TestsNotFoundError, T as ThreadsPoolWorker, h as TypecheckPoolWorker, b as VitestPackageInstaller, j as VmForksPoolWorker, k as VmThreadsPoolWorker, o as createDebugger, d as createMethodsRPC, n as createViteLogger, c as createVitest, e as escapeTestName, l as experimental_getRunnerTask, g as getFilePoolName, i as isValidApiRequest, m as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.Csks4as1.js';
|
|
6
|
+
export { p as parseCLI } from './chunks/cac.G9DAn-c7.js';
|
|
7
|
+
import { r as resolveConfig$2 } from './chunks/coverage.C2LA1DSL.js';
|
|
8
|
+
export { b as BaseSequencer, a as resolveApiServerConfig } from './chunks/coverage.C2LA1DSL.js';
|
|
9
9
|
import { slash, deepClone } from '@vitest/utils/helpers';
|
|
10
10
|
import { a as any } from './chunks/index.Dc3xnDvT.js';
|
|
11
11
|
import { resolve } from 'pathe';
|
|
@@ -18,7 +18,7 @@ import 'node:path';
|
|
|
18
18
|
import 'node:os';
|
|
19
19
|
import '@vitest/snapshot/manager';
|
|
20
20
|
import './chunks/index.Bgo3tNWt.js';
|
|
21
|
-
import './chunks/index.
|
|
21
|
+
import './chunks/index.CVpyv-Zg.js';
|
|
22
22
|
import 'node:fs/promises';
|
|
23
23
|
import 'node:perf_hooks';
|
|
24
24
|
import '@vitest/utils/source-map';
|
|
@@ -62,7 +62,7 @@ import './chunks/defaults.BOqNVLsY.js';
|
|
|
62
62
|
import '@vitest/utils/constants';
|
|
63
63
|
import '@vitest/utils/resolver';
|
|
64
64
|
import 'es-module-lexer';
|
|
65
|
-
import './chunks/index.
|
|
65
|
+
import './chunks/index.jMQYiEWE.js';
|
|
66
66
|
import 'node:assert';
|
|
67
67
|
import '@vitest/utils/serialize';
|
|
68
68
|
import 'node:readline';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { aR as BaseReporter, aS as BenchmarkBuiltinReporters, aE as BenchmarkReporter, aF as BenchmarkReportsMap, aT as BuiltinReporterOptions, aU as BuiltinReporters, aG as DefaultReporter, aH as DotReporter, aI as GithubActionsReporter, aJ as HangingProcessReporter, aL as JUnitReporter, aV as JsonAssertionResult, aK as JsonReporter, aW as JsonTestResult, aX as JsonTestResults, aB as ReportedHookContext, aC as Reporter, aM as ReportersMap, aN as TapFlatReporter, aO as TapReporter, aD as TestRunEndReason, aP as VerboseBenchmarkReporter, aQ as VerboseReporter } from './chunks/reporters.d.
|
|
1
|
+
export { aR as BaseReporter, aS as BenchmarkBuiltinReporters, aE as BenchmarkReporter, aF as BenchmarkReportsMap, aT as BuiltinReporterOptions, aU as BuiltinReporters, aG as DefaultReporter, aH as DotReporter, aI as GithubActionsReporter, aJ as HangingProcessReporter, aL as JUnitReporter, aV as JsonAssertionResult, aK as JsonReporter, aW as JsonTestResult, aX as JsonTestResults, aB as ReportedHookContext, aC as Reporter, aM as ReportersMap, aN as TapFlatReporter, aO as TapReporter, aD as TestRunEndReason, aP as VerboseBenchmarkReporter, aQ as VerboseReporter } from './chunks/reporters.d.CSNcMDxF.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
3
|
import '@vitest/utils';
|
|
4
|
-
import './chunks/worker.d.
|
|
4
|
+
import './chunks/worker.d.D25zYZ7N.js';
|
|
5
5
|
import 'vite/module-runner';
|
|
6
|
-
import './chunks/config.d.
|
|
6
|
+
import './chunks/config.d.BTfZNUu9.js';
|
|
7
7
|
import '@vitest/pretty-format';
|
|
8
8
|
import '@vitest/snapshot';
|
|
9
9
|
import '@vitest/utils/diff';
|
|
@@ -13,7 +13,7 @@ import 'vite';
|
|
|
13
13
|
import '@vitest/mocker';
|
|
14
14
|
import '@vitest/utils/source-map';
|
|
15
15
|
import 'vitest/browser';
|
|
16
|
-
import './chunks/browser.d.
|
|
16
|
+
import './chunks/browser.d.-LKfRopd.js';
|
|
17
17
|
import '@vitest/expect';
|
|
18
18
|
import 'vitest/optional-types.js';
|
|
19
19
|
import './chunks/benchmark.d.DAaHLpsq.js';
|
package/dist/reporters.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.
|
|
2
|
-
export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.
|
|
1
|
+
export { D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.CVpyv-Zg.js';
|
|
2
|
+
export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.jMQYiEWE.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:fs/promises';
|
|
5
5
|
import 'pathe';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as tinybench from 'tinybench';
|
|
2
2
|
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, TestContext, ImportDuration } from '@vitest/runner';
|
|
3
3
|
export { VitestRunner } from '@vitest/runner';
|
|
4
|
-
import { S as SerializedConfig } from './chunks/config.d.
|
|
4
|
+
import { S as SerializedConfig } from './chunks/config.d.BTfZNUu9.js';
|
|
5
5
|
import '@vitest/pretty-format';
|
|
6
6
|
import '@vitest/snapshot';
|
|
7
7
|
import '@vitest/utils/diff';
|
package/dist/runners.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { N as NodeBenchmarkRunner, V as VitestTestRunner } from './chunks/test.
|
|
1
|
+
export { N as NodeBenchmarkRunner, V as VitestTestRunner } from './chunks/test.B6aJd6T3.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
3
|
import '@vitest/utils/helpers';
|
|
4
4
|
import '@vitest/utils/timers';
|
|
@@ -15,5 +15,5 @@ import '@vitest/utils/offset';
|
|
|
15
15
|
import '@vitest/utils/source-map';
|
|
16
16
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
17
17
|
import './chunks/date.-jtEtIeV.js';
|
|
18
|
-
import './chunks/rpc.
|
|
18
|
+
import './chunks/rpc.D38ahn14.js';
|
|
19
19
|
import './chunks/index.Bgo3tNWt.js';
|
package/dist/worker.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { W as WorkerGlobalState, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.
|
|
1
|
+
import { W as WorkerGlobalState, B as BirpcOptions, R as RuntimeRPC, a as WorkerSetupContext } from './chunks/worker.d.D25zYZ7N.js';
|
|
2
2
|
import { Awaitable } from '@vitest/utils';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite/module-runner';
|
|
5
|
-
import './chunks/config.d.
|
|
5
|
+
import './chunks/config.d.BTfZNUu9.js';
|
|
6
6
|
import '@vitest/pretty-format';
|
|
7
7
|
import '@vitest/snapshot';
|
|
8
8
|
import '@vitest/utils/diff';
|
|
@@ -15,6 +15,7 @@ type WorkerRpcOptions = Pick<BirpcOptions<RuntimeRPC>, "on" | "off" | "post" | "
|
|
|
15
15
|
interface VitestWorker extends WorkerRpcOptions {
|
|
16
16
|
runTests: (state: WorkerGlobalState) => Awaitable<unknown>;
|
|
17
17
|
collectTests: (state: WorkerGlobalState) => Awaitable<unknown>;
|
|
18
|
+
setup?: (context: WorkerSetupContext) => Promise<() => Promise<unknown>>;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
interface Options extends VitestWorker {
|
package/dist/worker.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export { r as runBaseTests } from './chunks/base.
|
|
2
|
-
export { i as init } from './chunks/init.
|
|
1
|
+
export { r as runBaseTests } from './chunks/base.D3GxgUMI.js';
|
|
2
|
+
export { i as init } from './chunks/init.fmH9J833.js';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import '@vitest/spy';
|
|
5
|
-
import './chunks/
|
|
6
|
-
import 'pathe';
|
|
7
|
-
import 'vite/module-runner';
|
|
8
|
-
import './chunks/startModuleRunner.BqQUfEjB.js';
|
|
9
|
-
import 'node:fs';
|
|
10
|
-
import 'node:module';
|
|
11
|
-
import '@vitest/utils/helpers';
|
|
12
|
-
import 'node:url';
|
|
13
|
-
import './path.js';
|
|
14
|
-
import 'node:path';
|
|
15
|
-
import '@vitest/utils/serialize';
|
|
16
|
-
import './module-evaluator.js';
|
|
17
|
-
import '@vitest/mocker';
|
|
18
|
-
import 'node:perf_hooks';
|
|
19
|
-
import '@vitest/runner';
|
|
20
|
-
import './chunks/resolveSnapshotEnvironment.BZzLjzkh.js';
|
|
5
|
+
import './chunks/index.DEPqWSIZ.js';
|
|
21
6
|
import '@vitest/expect';
|
|
22
7
|
import './chunks/setup-common.DR1sucx6.js';
|
|
23
8
|
import './chunks/coverage.D_JHT54q.js';
|
|
24
9
|
import '@vitest/snapshot';
|
|
25
10
|
import '@vitest/utils/timers';
|
|
26
11
|
import './chunks/utils.CG9h5ccR.js';
|
|
27
|
-
import './chunks/rpc.
|
|
12
|
+
import './chunks/rpc.D38ahn14.js';
|
|
28
13
|
import './chunks/index.Bgo3tNWt.js';
|
|
29
|
-
import './chunks/test.
|
|
14
|
+
import './chunks/test.B6aJd6T3.js';
|
|
15
|
+
import '@vitest/runner';
|
|
16
|
+
import '@vitest/utils/helpers';
|
|
30
17
|
import './chunks/benchmark.DHKMYAts.js';
|
|
31
18
|
import '@vitest/runner/utils';
|
|
32
19
|
import '@vitest/utils/error';
|
|
20
|
+
import 'pathe';
|
|
33
21
|
import './chunks/vi.BZvkKVkM.js';
|
|
34
22
|
import '@vitest/utils/offset';
|
|
35
23
|
import '@vitest/utils/source-map';
|
|
36
24
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
37
25
|
import './chunks/date.-jtEtIeV.js';
|
|
26
|
+
import './chunks/evaluatedModules.Dg1zASAC.js';
|
|
27
|
+
import 'vite/module-runner';
|
|
28
|
+
import './chunks/startModuleRunner.Cn7hCL7D.js';
|
|
29
|
+
import 'node:fs';
|
|
30
|
+
import 'node:module';
|
|
31
|
+
import 'node:url';
|
|
32
|
+
import './path.js';
|
|
33
|
+
import 'node:path';
|
|
34
|
+
import '@vitest/utils/serialize';
|
|
35
|
+
import './module-evaluator.js';
|
|
36
|
+
import '@vitest/mocker';
|
|
37
|
+
import 'node:perf_hooks';
|
|
38
38
|
import './chunks/inspector.DLZxSeU3.js';
|
|
39
39
|
import 'node:timers';
|
|
40
40
|
import 'node:timers/promises';
|
|
@@ -42,5 +42,5 @@ import 'node:util';
|
|
|
42
42
|
import '@vitest/utils/constants';
|
|
43
43
|
import './chunks/index.RwjEGCQ0.js';
|
|
44
44
|
import 'expect-type';
|
|
45
|
-
import './chunks/index.
|
|
45
|
+
import './chunks/index.CWIFvlX5.js';
|
|
46
46
|
import 'node:console';
|