vitest 2.1.3 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE.md +1 -209
  2. package/dist/browser.d.ts +24 -24
  3. package/dist/browser.js +7 -7
  4. package/dist/chunks/{RandomSequencer.Bh5-tlNJ.js → RandomSequencer.CMRlh2v4.js} +143 -142
  5. package/dist/chunks/{base.BO5Jx7vw.js → base.BZZh4cSm.js} +3 -3
  6. package/dist/chunks/{benchmark.C8CRJYG4.js → benchmark.Cdu9hjj4.js} +2 -2
  7. package/dist/chunks/{benchmark.JVlTzojj.d.ts → benchmark.geERunq4.d.ts} +1 -1
  8. package/dist/chunks/{cac.BSMVokHR.js → cac.DWAW3Uh5.js} +11 -10
  9. package/dist/chunks/{cli-api.btGgw3PC.js → cli-api.BtqJwSCh.js} +828 -644
  10. package/dist/chunks/{config.Crbj2GAb.d.ts → config.Cy0C388Z.d.ts} +0 -1
  11. package/dist/chunks/{console.CfT1Wjed.js → console.BYGVloWk.js} +2 -6
  12. package/dist/chunks/{coverage.zlNdAMHK.js → coverage.BoMDb1ip.js} +1 -1
  13. package/dist/chunks/{creator.CBPphXqR.js → creator.IIqd8RWT.js} +8 -8
  14. package/dist/chunks/{execute._eQQfgI8.js → execute.2pr0rHgK.js} +8 -6
  15. package/dist/chunks/{globals.Bdzt04Qm.js → globals.D8ZVAdXd.js} +8 -13
  16. package/dist/chunks/{index.BpSiYbpB.js → index.68735LiX.js} +28 -5
  17. package/dist/chunks/{index.X0nbfr6-.js → index.BJDntFik.js} +7 -7
  18. package/dist/chunks/{index.CPD77dLA.js → index.CqYx2Nsr.js} +7 -7
  19. package/dist/chunks/{index.Dz2opmmU.js → index.DsZFoqi9.js} +3711 -3788
  20. package/dist/chunks/{index.lVXYBqEP.js → index.K90BXFOx.js} +186 -186
  21. package/dist/chunks/index.ckWaX2gY.js +54 -0
  22. package/dist/chunks/{index.4GFF2h22.js → index.nEwtF0bu.js} +6 -6
  23. package/dist/chunks/{node.Bx4JZjMG.js → node.AKq966Jp.js} +1 -5
  24. package/dist/chunks/{reporters.C4ZHgdxQ.d.ts → reporters.D7Jzd9GS.d.ts} +1246 -1221
  25. package/dist/chunks/{resolveConfig.Dha6ilPI.js → resolveConfig.RxKrDli4.js} +3196 -3176
  26. package/dist/chunks/{rpc.B7Mfb-Yf.js → rpc.C3q9uwRX.js} +2 -2
  27. package/dist/chunks/{run-once.Sxe67Wng.js → run-once.2ogXb3JV.js} +1 -1
  28. package/dist/chunks/{runBaseTests.Cx4wXyTR.js → runBaseTests.3qpJUEJM.js} +21 -25
  29. package/dist/chunks/{setup-common.BKyF15v_.js → setup-common.Dj6BZI3u.js} +3 -3
  30. package/dist/chunks/{suite.BMWOKiTe.d.ts → suite.B2jumIFP.d.ts} +2 -2
  31. package/dist/chunks/utils.C8RiOc4B.js +77 -0
  32. package/dist/chunks/{utils.CY6Spixo.js → utils.DNoFbBUZ.js} +7 -3
  33. package/dist/chunks/{vi.BskyZC5g.js → vi.DgezovHB.js} +177 -142
  34. package/dist/chunks/{vite.YH7MrecS.d.ts → vite.C-N5BBZe.d.ts} +1 -1
  35. package/dist/chunks/{vm.DB_hLchi.js → vm.Zr4qWzDJ.js} +8 -8
  36. package/dist/chunks/{worker.CcJLfX8w.d.ts → worker.B9FxPCaC.d.ts} +1 -1
  37. package/dist/chunks/{worker.B6RjTtbk.d.ts → worker.tN5KGIih.d.ts} +14 -4
  38. package/dist/cli.js +3 -4
  39. package/dist/config.cjs +4 -4
  40. package/dist/config.d.ts +11 -11
  41. package/dist/config.js +4 -4
  42. package/dist/coverage.d.ts +10 -10
  43. package/dist/coverage.js +8 -11
  44. package/dist/environments.d.ts +2 -2
  45. package/dist/environments.js +1 -1
  46. package/dist/execute.d.ts +54 -54
  47. package/dist/execute.js +7 -6
  48. package/dist/index.d.ts +106 -1101
  49. package/dist/index.js +7 -18
  50. package/dist/node.d.ts +44 -42
  51. package/dist/node.js +23 -29
  52. package/dist/path.js +1 -1
  53. package/dist/reporters.d.ts +10 -10
  54. package/dist/reporters.js +12 -18
  55. package/dist/runners.d.ts +12 -19
  56. package/dist/runners.js +142 -148
  57. package/dist/snapshot.js +2 -6
  58. package/dist/suite.d.ts +2 -2
  59. package/dist/suite.js +2 -6
  60. package/dist/worker.js +10 -7
  61. package/dist/workers/forks.js +9 -8
  62. package/dist/workers/runVmTests.js +16 -20
  63. package/dist/workers/threads.js +9 -8
  64. package/dist/workers/vmForks.js +9 -12
  65. package/dist/workers/vmThreads.js +9 -12
  66. package/dist/workers.d.ts +14 -14
  67. package/dist/workers.js +15 -18
  68. package/package.json +27 -27
  69. package/dist/chunks/base.DwXGwWst.js +0 -89
  70. package/dist/chunks/env.CmHVDJnw.js +0 -7
  71. package/dist/chunks/index.-d_XpZEA.js +0 -140
  72. package/dist/chunks/index.CxRxs566.js +0 -23
  73. package/dist/chunks/tasks.BZnCS9aT.js +0 -18
  74. package/dist/chunks/utils.Ck2hJTRs.js +0 -23
  75. package/dist/chunks/{environment.CzISCQ7o.d.ts → environment.LoooBwUu.d.ts} +24 -24
@@ -1,8 +1,8 @@
1
- import { ViteNodeResolveId, ModuleCacheMap } from 'vite-node';
2
1
  import { File, TaskResultPack, CancelReason, Task } from '@vitest/runner';
3
- import { S as SerializedConfig } from './config.Crbj2GAb.js';
2
+ import { ViteNodeResolveId, ModuleCacheMap } from 'vite-node';
3
+ import { S as SerializedConfig } from './config.Cy0C388Z.js';
4
+ import { T as TransformMode, U as UserConsoleLog, A as AfterSuiteRunMeta, E as Environment } from './environment.LoooBwUu.js';
4
5
  import { SnapshotResult } from '@vitest/snapshot';
5
- import { T as TransformMode, U as UserConsoleLog, A as AfterSuiteRunMeta, E as Environment } from './environment.CzISCQ7o.js';
6
6
 
7
7
  type ArgumentsType<T> = T extends (...args: infer A) => any ? A : never;
8
8
  type ReturnType<T> = T extends (...args: any) => infer R ? R : never;
@@ -17,6 +17,10 @@ interface ChannelOptions {
17
17
  * Listener to receive raw message
18
18
  */
19
19
  on: (fn: (data: any, ...extras: any[]) => void) => any | Promise<any>;
20
+ /**
21
+ * Clear the listener when `$close` is called
22
+ */
23
+ off?: (fn: (data: any, ...extras: any[]) => void) => any | Promise<any>;
20
24
  /**
21
25
  * Custom function to serialize data
22
26
  *
@@ -29,6 +33,10 @@ interface ChannelOptions {
29
33
  * by default it passes the data as-is
30
34
  */
31
35
  deserialize?: (data: any) => any;
36
+ /**
37
+ * Call the methods with the RPC context or the original functions object
38
+ */
39
+ bind?: 'rpc' | 'functions';
32
40
  }
33
41
  interface EventOptions<Remote> {
34
42
  /**
@@ -67,6 +75,7 @@ type BirpcReturn<RemoteFunctions, LocalFunctions = Record<string, never>> = {
67
75
  [K in keyof RemoteFunctions]: BirpcFn<RemoteFunctions[K]>;
68
76
  } & {
69
77
  $functions: LocalFunctions;
78
+ $close: () => void;
70
79
  };
71
80
 
72
81
  interface RuntimeRPC {
@@ -141,6 +150,7 @@ interface WorkerGlobalState {
141
150
  environment: number;
142
151
  prepare: number;
143
152
  };
153
+ onFilterStackTrace?: (trace: string) => string;
144
154
  }
145
155
 
146
- export type { BirpcOptions as B, ContextRPC as C, RuntimeRPC as R, WorkerGlobalState as W, BirpcReturn as a, WorkerRPC as b, RunnerRPC as c, ResolveIdFunction as d, ContextTestEnvironment as e };
156
+ export type { BirpcOptions as B, ContextRPC as C, RuntimeRPC as R, WorkerGlobalState as W, BirpcReturn as a, WorkerRPC as b, RunnerRPC as c, ContextTestEnvironment as d, ResolveIdFunction as e };
package/dist/cli.js CHANGED
@@ -1,9 +1,8 @@
1
- import { c as createCLI } from './chunks/cac.BSMVokHR.js';
2
- import 'pathe';
1
+ import { c as createCLI } from './chunks/cac.DWAW3Uh5.js';
2
+ import '@vitest/utils';
3
3
  import 'events';
4
+ import 'pathe';
4
5
  import 'tinyrainbow';
5
- import './chunks/base.DwXGwWst.js';
6
- import '@vitest/utils';
7
6
  import './chunks/constants.fzPh7AOq.js';
8
7
 
9
8
  createCLI().parse();
package/dist/config.cjs CHANGED
@@ -4,10 +4,6 @@ var os = require('node:os');
4
4
  var stdEnv = require('std-env');
5
5
  var vite = require('vite');
6
6
 
7
- const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
8
- const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== void 0;
9
- (isNode || isDeno) && process.platform === "win32";
10
-
11
7
  const defaultBrowserPort = 63315;
12
8
  const extraInlineDeps = [
13
9
  /^(?!.*node_modules).*\.mjs$/,
@@ -16,6 +12,10 @@ const extraInlineDeps = [
16
12
  /vite\w*\/dist\/client\/env.mjs/
17
13
  ];
18
14
 
15
+ const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
16
+ const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== void 0;
17
+ (isNode || isDeno) && process.platform === "win32";
18
+
19
19
  const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
20
20
  const defaultExclude = [
21
21
  "**/node_modules/**",
package/dist/config.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- import './chunks/vite.YH7MrecS.js';
2
1
  import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
3
2
  export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
4
- import { R as ResolvedCoverageOptions, c as CoverageV8Options, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport, W as WorkspaceProjectConfiguration } from './chunks/reporters.C4ZHgdxQ.js';
3
+ import { R as ResolvedCoverageOptions, c as CoverageV8Options, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport, W as WorkspaceProjectConfiguration } from './chunks/reporters.D7Jzd9GS.js';
4
+ import './chunks/vite.C-N5BBZe.js';
5
5
  import '@vitest/runner';
6
+ import './chunks/environment.LoooBwUu.js';
7
+ import 'node:stream';
8
+ import '@vitest/utils';
9
+ import './chunks/config.Cy0C388Z.js';
6
10
  import '@vitest/pretty-format';
7
- import './chunks/config.Crbj2GAb.js';
8
11
  import '@vitest/snapshot';
9
12
  import '@vitest/snapshot/environment';
10
13
  import 'vite-node';
11
- import './chunks/environment.CzISCQ7o.js';
12
- import 'node:stream';
14
+ import 'chai';
15
+ import '@vitest/utils/source-map';
13
16
  import 'vite-node/client';
14
- import '@vitest/snapshot/manager';
15
17
  import 'vite-node/server';
16
- import '@vitest/utils';
17
- import '@vitest/utils/source-map';
18
- import 'node:fs';
19
- import 'chai';
20
- import './chunks/benchmark.JVlTzojj.js';
18
+ import './chunks/benchmark.geERunq4.js';
21
19
  import '@vitest/runner/utils';
22
20
  import 'tinybench';
21
+ import '@vitest/snapshot/manager';
22
+ import 'node:fs';
23
23
 
24
24
  declare const defaultBrowserPort = 63315;
25
25
  declare const extraInlineDeps: RegExp[];
package/dist/config.js CHANGED
@@ -2,10 +2,6 @@ import os from 'node:os';
2
2
  import { isCI } from 'std-env';
3
3
  export { mergeConfig } from 'vite';
4
4
 
5
- const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
6
- const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== void 0;
7
- (isNode || isDeno) && process.platform === "win32";
8
-
9
5
  const defaultBrowserPort = 63315;
10
6
  const extraInlineDeps = [
11
7
  /^(?!.*node_modules).*\.mjs$/,
@@ -14,6 +10,10 @@ const extraInlineDeps = [
14
10
  /vite\w*\/dist\/client\/env.mjs/
15
11
  ];
16
12
 
13
+ const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
14
+ const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== void 0;
15
+ (isNode || isDeno) && process.platform === "win32";
16
+
17
17
  const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
18
18
  const defaultExclude = [
19
19
  "**/node_modules/**",
@@ -1,23 +1,23 @@
1
1
  import * as vite from 'vite';
2
- import { A as AfterSuiteRunMeta } from './chunks/environment.CzISCQ7o.js';
3
- import { R as ResolvedCoverageOptions, V as Vitest, a as ReportContext } from './chunks/reporters.C4ZHgdxQ.js';
2
+ import { R as ResolvedCoverageOptions, V as Vitest, a as ReportContext } from './chunks/reporters.D7Jzd9GS.js';
3
+ import { A as AfterSuiteRunMeta } from './chunks/environment.LoooBwUu.js';
4
4
  import '@vitest/runner';
5
+ import 'node:stream';
6
+ import '@vitest/utils';
7
+ import './chunks/config.Cy0C388Z.js';
5
8
  import '@vitest/pretty-format';
6
- import './chunks/config.Crbj2GAb.js';
7
9
  import '@vitest/snapshot';
8
10
  import '@vitest/snapshot/environment';
9
11
  import 'vite-node';
10
- import 'node:stream';
12
+ import 'chai';
13
+ import '@vitest/utils/source-map';
11
14
  import 'vite-node/client';
12
- import '@vitest/snapshot/manager';
13
15
  import 'vite-node/server';
14
- import '@vitest/utils';
15
- import '@vitest/utils/source-map';
16
- import 'node:fs';
17
- import 'chai';
18
- import './chunks/benchmark.JVlTzojj.js';
16
+ import './chunks/benchmark.geERunq4.js';
19
17
  import '@vitest/runner/utils';
20
18
  import 'tinybench';
19
+ import '@vitest/snapshot/manager';
20
+ import 'node:fs';
21
21
 
22
22
  interface CoverageSummaryData {
23
23
  lines: Totals;
package/dist/coverage.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { existsSync, promises, readdirSync, writeFileSync } from 'node:fs';
2
+ import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.RxKrDli4.js';
2
3
  import { resolve, relative } from 'pathe';
3
- import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.Dha6ilPI.js';
4
4
  import c from 'tinyrainbow';
5
+ import '@vitest/utils';
5
6
  import 'node:path';
6
7
  import 'node:fs/promises';
7
8
  import 'node:process';
@@ -12,26 +13,22 @@ import 'node:v8';
12
13
  import 'node:util';
13
14
  import './chunks/constants.fzPh7AOq.js';
14
15
  import 'node:os';
15
- import './chunks/env.CmHVDJnw.js';
16
+ import './chunks/RandomSequencer.CMRlh2v4.js';
16
17
  import 'std-env';
17
- import '@vitest/runner/utils';
18
- import './chunks/base.DwXGwWst.js';
19
- import '@vitest/utils';
20
- import 'node:crypto';
21
- import './chunks/RandomSequencer.Bh5-tlNJ.js';
22
18
  import 'node:perf_hooks';
19
+ import '@vitest/runner/utils';
23
20
  import '@vitest/utils/source-map';
24
21
  import 'tinyexec';
25
- import 'path';
26
- import 'fs';
27
- import 'module';
28
22
  import 'vite';
23
+ import 'fs';
29
24
  import 'vite-node/utils';
25
+ import 'node:crypto';
30
26
  import './chunks/_commonjsHelpers.BFTU3MAI.js';
31
27
  import 'util';
28
+ import 'path';
32
29
  import 'node:events';
30
+ import './chunks/index.68735LiX.js';
33
31
  import 'tinypool';
34
- import './chunks/index.BpSiYbpB.js';
35
32
  import 'node:worker_threads';
36
33
  import './path.js';
37
34
 
@@ -1,5 +1,5 @@
1
- import { E as Environment } from './chunks/environment.CzISCQ7o.js';
2
- export { a as EnvironmentReturn, V as VmEnvironmentReturn } from './chunks/environment.CzISCQ7o.js';
1
+ import { E as Environment } from './chunks/environment.LoooBwUu.js';
2
+ export { a as EnvironmentReturn, V as VmEnvironmentReturn } from './chunks/environment.LoooBwUu.js';
3
3
 
4
4
  declare const environments: {
5
5
  node: Environment;
@@ -1,2 +1,2 @@
1
- export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.lVXYBqEP.js';
1
+ export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.K90BXFOx.js';
2
2
  import 'node:console';
package/dist/execute.d.ts CHANGED
@@ -1,58 +1,23 @@
1
- import vm from 'node:vm';
2
- import { ViteNodeRunner } from 'vite-node/client';
3
1
  import { ViteNodeRunnerOptions } from 'vite-node';
4
- import { R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.B6RjTtbk.js';
2
+ import { ViteNodeRunner } from 'vite-node/client';
3
+ import { R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.tN5KGIih.js';
4
+ import vm from 'node:vm';
5
5
  import * as _vitest_mocker from '@vitest/mocker';
6
6
  import { MockedModuleType } from '@vitest/mocker';
7
7
  import { P as PendingSuiteMock, b as MockFactory, a as MockOptions } from './chunks/mocker.cRtM890J.js';
8
8
  import '@vitest/runner';
9
- import './chunks/config.Crbj2GAb.js';
9
+ import './chunks/config.Cy0C388Z.js';
10
10
  import '@vitest/pretty-format';
11
11
  import '@vitest/snapshot';
12
12
  import '@vitest/snapshot/environment';
13
- import './chunks/environment.CzISCQ7o.js';
13
+ import './chunks/environment.LoooBwUu.js';
14
14
 
15
- interface MockContext {
16
- /**
17
- * When mocking with a factory, this refers to the module that imported the mock.
18
- */
19
- callstack: null | string[];
20
- }
21
- declare class VitestMocker {
22
- executor: VitestExecutor;
23
- static pendingIds: PendingSuiteMock[];
24
- private spyModule?;
25
- private primitives;
26
- private filterPublicKeys;
27
- private registries;
28
- private mockContext;
29
- constructor(executor: VitestExecutor);
30
- private get root();
31
- private get moduleCache();
32
- private get moduleDirectories();
33
- initializeSpyModule(): Promise<void>;
34
- private getMockerRegistry;
35
- reset(): void;
36
- private deleteCachedItem;
37
- private isModuleDirectory;
38
- getSuiteFilepath(): string;
39
- private createError;
40
- private resolvePath;
41
- resolveMocks(): Promise<void>;
42
- private callFunctionMock;
43
- getMockContext(): MockContext;
44
- getMockPath(dep: string): string;
45
- getDependencyMock(id: string): _vitest_mocker.MockedModule | undefined;
46
- normalizePath(path: string): string;
47
- resolveMockPath(mockPath: string, external: string | null): string | null;
48
- mockObject(object: Record<string | symbol, any>, mockExports?: Record<string | symbol, any>, behavior?: MockedModuleType): Record<string | symbol, any>;
49
- unmockPath(path: string): void;
50
- mockPath(originalId: string, path: string, external: string | null, mockType: MockedModuleType | undefined, factory: MockFactory | undefined): void;
51
- importActual<T>(rawId: string, importer: string, callstack?: string[] | null): Promise<T>;
52
- importMock(rawId: string, importee: string): Promise<any>;
53
- requestWithMock(url: string, callstack: string[]): Promise<any>;
54
- queueMock(id: string, importer: string, factoryOrOptions?: MockFactory | MockOptions): void;
55
- queueUnmock(id: string, importer: string): void;
15
+ declare class FileMap {
16
+ private fsCache;
17
+ private fsBufferCache;
18
+ readFileAsync(path: string): Promise<string>;
19
+ readFile(path: string): string;
20
+ readBuffer(path: string): Buffer;
56
21
  }
57
22
 
58
23
  interface ModuleEvaluateOptions {
@@ -74,14 +39,6 @@ declare class VMModule {
74
39
  link(linker: ModuleLinker): Promise<void>;
75
40
  }
76
41
 
77
- declare class FileMap {
78
- private fsCache;
79
- private fsBufferCache;
80
- readFileAsync(path: string): Promise<string>;
81
- readFile(path: string): string;
82
- readBuffer(path: string): Buffer;
83
- }
84
-
85
42
  interface ExternalModulesExecutorOptions {
86
43
  context: vm.Context;
87
44
  fileMap: FileMap;
@@ -114,6 +71,49 @@ declare class ExternalModulesExecutor {
114
71
  private get isNetworkSupported();
115
72
  }
116
73
 
74
+ interface MockContext {
75
+ /**
76
+ * When mocking with a factory, this refers to the module that imported the mock.
77
+ */
78
+ callstack: null | string[];
79
+ }
80
+ declare class VitestMocker {
81
+ executor: VitestExecutor;
82
+ static pendingIds: PendingSuiteMock[];
83
+ private spyModule?;
84
+ private primitives;
85
+ private filterPublicKeys;
86
+ private registries;
87
+ private mockContext;
88
+ constructor(executor: VitestExecutor);
89
+ private get root();
90
+ private get moduleCache();
91
+ private get moduleDirectories();
92
+ initializeSpyModule(): Promise<void>;
93
+ private getMockerRegistry;
94
+ reset(): void;
95
+ private deleteCachedItem;
96
+ private isModuleDirectory;
97
+ getSuiteFilepath(): string;
98
+ private createError;
99
+ private resolvePath;
100
+ resolveMocks(): Promise<void>;
101
+ private callFunctionMock;
102
+ getMockContext(): MockContext;
103
+ getMockPath(dep: string): string;
104
+ getDependencyMock(id: string): _vitest_mocker.MockedModule | undefined;
105
+ normalizePath(path: string): string;
106
+ resolveMockPath(mockPath: string, external: string | null): string | null;
107
+ mockObject(object: Record<string | symbol, any>, mockExports?: Record<string | symbol, any>, behavior?: MockedModuleType): Record<string | symbol, any>;
108
+ unmockPath(path: string): void;
109
+ mockPath(originalId: string, path: string, external: string | null, mockType: MockedModuleType | undefined, factory: MockFactory | undefined): void;
110
+ importActual<T>(rawId: string, importer: string, callstack?: string[] | null): Promise<T>;
111
+ importMock(rawId: string, importee: string): Promise<any>;
112
+ requestWithMock(url: string, callstack: string[]): Promise<any>;
113
+ queueMock(id: string, importer: string, factoryOrOptions?: MockFactory | MockOptions): void;
114
+ queueUnmock(id: string, importer: string): void;
115
+ }
116
+
117
117
  interface ExecuteOptions extends ViteNodeRunnerOptions {
118
118
  moduleDirectories?: string[];
119
119
  state: WorkerGlobalState;
package/dist/execute.js CHANGED
@@ -1,12 +1,13 @@
1
- export { V as VitestExecutor } from './chunks/execute._eQQfgI8.js';
2
- import 'node:vm';
3
- import 'node:url';
1
+ export { V as VitestExecutor } from './chunks/execute.2pr0rHgK.js';
4
2
  import 'node:fs';
3
+ import 'node:url';
4
+ import 'node:vm';
5
+ import '@vitest/utils/error';
6
+ import 'pathe';
5
7
  import 'vite-node/client';
6
8
  import 'vite-node/utils';
7
- import 'pathe';
8
- import '@vitest/utils/error';
9
9
  import './path.js';
10
- import '@vitest/utils';
10
+ import 'node:path';
11
11
  import '@vitest/mocker';
12
12
  import 'node:module';
13
+ import '@vitest/utils';