vitest 3.0.7 → 3.0.9
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 +14 -43
- package/dist/browser.js +4 -4
- package/dist/chunks/{base.BgUWWWYp.js → base.DV59CbtV.js} +2 -2
- package/dist/chunks/{benchmark.Cdu9hjj4.js → benchmark.DL72EVN-.js} +1 -1
- package/dist/chunks/{benchmark.CFFwLv-O.d.ts → benchmark.d.BwvBVTda.d.ts} +11 -11
- package/dist/chunks/{cac.87F_onld.js → cac.CeVHgzve.js} +30 -6
- package/dist/chunks/{cli-api.BZbq1zTX.js → cli-api.Ckwz_xSb.js} +21 -23
- package/dist/chunks/config.d.DevWltVl.d.ts +218 -0
- package/dist/chunks/{constants.fzPh7AOq.js → constants.DTYd6dNH.js} +1 -1
- package/dist/chunks/{coverage.DnNIv-kJ.js → coverage.A3sS5-Wm.js} +1 -29
- package/dist/chunks/coverage.d.S9RMNXIe.d.ts +35 -0
- package/dist/chunks/{resolveConfig.BbcK25zb.js → coverage.gV8doR2Y.js} +500 -131
- package/dist/chunks/{creator.2CFRE1Yx.js → creator.BsBnpTzI.js} +1 -1
- package/dist/chunks/defaults.C2Ndd9wx.js +119 -0
- package/dist/chunks/env.D4Lgay0q.js +8 -0
- package/dist/chunks/environment.d.C8UItCbf.d.ts +170 -0
- package/dist/chunks/{execute.Bhwls1-Z.js → execute.eDH0aFFd.js} +4 -4
- package/dist/chunks/global.d.Cg2sEPIm.d.ts +127 -0
- package/dist/chunks/{globals.BCtI_nQG.js → globals.BEpDe-k3.js} +5 -5
- package/dist/chunks/{index.C1f-_gvH.js → index.B8tIoLPT.js} +8 -3
- package/dist/chunks/{index.B8haHJlQ.js → index.D7Ny8f_s.js} +2 -2
- package/dist/chunks/{index.BmFFzXX_.js → index.uXkkC4xl.js} +1 -2
- package/dist/chunks/{mocker.cRtM890J.d.ts → mocker.d.BE_2ls6u.d.ts} +6 -6
- package/dist/chunks/reporters.d.CqBhtcTq.d.ts +3006 -0
- package/dist/chunks/{runBaseTests.9XCQcSZC.js → runBaseTests.BVrL_ow3.js} +9 -9
- package/dist/chunks/{setup-common.wObu9a36.js → setup-common.CPvtqi8q.js} +25 -2
- package/dist/chunks/{suite.qtkXWc6R.d.ts → suite.d.FvehnV49.d.ts} +1 -1
- package/dist/chunks/{typechecker.cZ0LjdSi.js → typechecker.BlF3eHsb.js} +2 -7
- package/dist/chunks/{vi.DT3m61kS.js → vi.nSCvwQ7l.js} +4 -4
- package/dist/chunks/vite.d.BUZTGxQ3.d.ts +11 -0
- package/dist/chunks/{vm.6kNys9FN.js → vm.jEFQDlX_.js} +1 -1
- package/dist/chunks/{worker.DaAIyCKm.d.ts → worker.d.C58isfFm.d.ts} +62 -62
- package/dist/chunks/{worker.B2JXutr8.d.ts → worker.d.CSFlSYJg.d.ts} +2 -2
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +48 -45
- package/dist/config.js +6 -123
- package/dist/coverage.d.ts +82 -79
- package/dist/coverage.js +19 -469
- package/dist/environments.d.ts +11 -11
- package/dist/execute.d.ts +109 -109
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +414 -412
- package/dist/index.js +4 -4
- package/dist/node.d.ts +51 -48
- package/dist/node.js +13 -10
- package/dist/reporters.d.ts +7 -4
- package/dist/reporters.js +3 -2
- package/dist/runners.d.ts +28 -28
- package/dist/runners.js +3 -4
- package/dist/snapshot.d.ts +2 -2
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +1 -1
- package/dist/workers/forks.js +2 -2
- package/dist/workers/runVmTests.js +9 -9
- package/dist/workers/threads.js +2 -2
- package/dist/workers/vmForks.js +2 -2
- package/dist/workers/vmThreads.js +2 -2
- package/dist/workers.d.ts +13 -13
- package/dist/workers.js +3 -3
- package/package.json +12 -12
- package/dist/chunks/config.BRtC-JeT.d.ts +0 -215
- package/dist/chunks/environment.d8YfPkTm.d.ts +0 -173
- package/dist/chunks/global.CnI8_G5V.d.ts +0 -133
- package/dist/chunks/reporters.QZ837uWx.d.ts +0 -3051
- package/dist/chunks/spy.Cf_4R5Oe.js +0 -22
- package/dist/chunks/vite.vM3UZq1q.d.ts +0 -11
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.
|
|
1
|
+
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.nSCvwQ7l.js';
|
|
2
2
|
export { i as isFirstRun, a as runOnce } from './chunks/run-once.2ogXb3JV.js';
|
|
3
|
-
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.
|
|
4
|
-
export { b as bench } from './chunks/benchmark.
|
|
3
|
+
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.D7Ny8f_s.js';
|
|
4
|
+
export { b as bench } from './chunks/benchmark.DL72EVN-.js';
|
|
5
5
|
export { expectTypeOf } from 'expect-type';
|
|
6
6
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
7
7
|
import * as chai from 'chai';
|
|
@@ -14,6 +14,6 @@ import '@vitest/utils';
|
|
|
14
14
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
15
15
|
import '@vitest/snapshot';
|
|
16
16
|
import '@vitest/utils/error';
|
|
17
|
+
import '@vitest/spy';
|
|
17
18
|
import '@vitest/utils/source-map';
|
|
18
19
|
import './chunks/date.W2xKR2qe.js';
|
|
19
|
-
import '@vitest/spy';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BaseCoverageOptions,
|
|
1
|
+
import { w as ResolvedConfig, v as UserConfig, s as VitestRunMode, z as VitestOptions, V as Vitest, A as ApiConfig, E as TestProject, F as TestSequencer, G as TestSpecification, L as Logger, H as TestModule, M as ModuleDiagnostic } from './chunks/reporters.d.CqBhtcTq.js';
|
|
2
|
+
export { B as BaseCoverageOptions, y as BenchmarkUserOptions, ad as BrowserBuiltinProvider, ae as BrowserCommand, af as BrowserCommandContext, n as BrowserConfigOptions, ag as BrowserInstanceOption, ah as BrowserOrchestrator, ai as BrowserProvider, aj as BrowserProviderInitializationOptions, ak as BrowserProviderModule, al as BrowserProviderOptions, m as BrowserScript, am as BrowserServerState, an as BrowserServerStateSession, o as BuiltinEnvironment, ao as CDPSession, r as CSSModuleScopeStrategy, j as CoverageIstanbulOptions, i as CoverageOptions, e as CoverageProvider, f as CoverageProviderModule, g as CoverageReporter, b as CoverageV8Options, k as CustomProviderOptions, D as DepsOptimizationOptions, Z as HTMLOptions, I as InlineConfig, $ as JUnitOptions, _ as JsonOptions, O as OnServerRestartHandler, J as OnTestsRerunHandler, ap as ParentProjectBrowser, P as Pool, q as PoolOptions, N as ProcessPool, aq as ProjectBrowser, x as ProjectConfig, a as ReportContext, aw as ReportedHookContext, l as Reporter, at as ResolveSnapshotPathHandler, au as ResolveSnapshotPathHandlerContext, ar as ResolvedBrowserOptions, R as ResolvedCoverageOptions, as as ResolvedProjectConfig, Y as SerializedTestProject, a0 as TaskOptions, a1 as TestCase, a2 as TestCollection, a3 as TestDiagnostic, a4 as TestModuleState, a5 as TestResult, a6 as TestResultFailed, a7 as TestResultPassed, a8 as TestResultSkipped, ax as TestRunEndReason, av as TestRunResult, ac as TestSequencerConstructor, a9 as TestState, aa as TestSuite, ab as TestSuiteState, t as TransformModePatterns, u as TypecheckConfig, U as UserWorkspaceConfig, p as VitestEnvironment, K as VitestPackageInstaller, Q as WorkspaceSpec, X as getFilePoolName } from './chunks/reporters.d.CqBhtcTq.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
|
|
4
4
|
import * as vite from 'vite';
|
|
5
5
|
export { vite as Vite };
|
|
6
6
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
7
7
|
import { IncomingMessage } from 'node:http';
|
|
8
|
-
import { R as RuntimeRPC } from './chunks/worker.
|
|
8
|
+
import { R as RuntimeRPC } from './chunks/worker.d.C58isfFm.js';
|
|
9
9
|
import { Writable } from 'node:stream';
|
|
10
|
-
export { W as WorkerContext } from './chunks/worker.
|
|
11
|
-
export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.
|
|
10
|
+
export { W as WorkerContext } from './chunks/worker.d.CSFlSYJg.js';
|
|
11
|
+
export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.d.Cg2sEPIm.js';
|
|
12
12
|
import { Debugger } from 'debug';
|
|
13
13
|
export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
14
|
-
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.
|
|
14
|
+
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.d.C8UItCbf.js';
|
|
15
15
|
export { SerializedError } from '@vitest/utils';
|
|
16
|
-
export { b as RuntimeConfig } from './chunks/config.
|
|
17
|
-
import './chunks/vite.
|
|
16
|
+
export { b as RuntimeConfig } from './chunks/config.d.DevWltVl.js';
|
|
17
|
+
import './chunks/vite.d.BUZTGxQ3.js';
|
|
18
18
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
19
|
+
import 'node:console';
|
|
19
20
|
import '@vitest/utils/source-map';
|
|
20
21
|
import '@vitest/pretty-format';
|
|
21
22
|
import '@vitest/snapshot';
|
|
22
23
|
import '@vitest/utils/diff';
|
|
23
24
|
import 'vite-node';
|
|
24
25
|
import 'chai';
|
|
25
|
-
import './chunks/benchmark.
|
|
26
|
+
import './chunks/benchmark.d.BwvBVTda.js';
|
|
26
27
|
import 'tinybench';
|
|
28
|
+
import './chunks/coverage.d.S9RMNXIe.js';
|
|
29
|
+
import 'vite-node/client';
|
|
27
30
|
import '@vitest/snapshot/manager';
|
|
28
31
|
import 'node:fs';
|
|
29
32
|
import 'node:worker_threads';
|
|
@@ -33,36 +36,36 @@ import '@vitest/snapshot/environment';
|
|
|
33
36
|
declare function isValidApiRequest(config: ResolvedConfig, req: IncomingMessage): boolean;
|
|
34
37
|
|
|
35
38
|
interface CliOptions extends UserConfig {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Override the watch mode
|
|
41
|
+
*/
|
|
42
|
+
run?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Removes colors from the console output
|
|
45
|
+
*/
|
|
46
|
+
color?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Output collected tests as JSON or to a file
|
|
49
|
+
*/
|
|
50
|
+
json?: string | boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Output collected test files only
|
|
53
|
+
*/
|
|
54
|
+
filesOnly?: boolean;
|
|
52
55
|
}
|
|
53
56
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
* Start Vitest programmatically
|
|
58
|
+
*
|
|
59
|
+
* Returns a Vitest instance if initialized successfully.
|
|
60
|
+
*/
|
|
58
61
|
declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
59
62
|
|
|
60
63
|
interface CliParseOptions {
|
|
61
|
-
|
|
64
|
+
allowUnknownOptions?: boolean;
|
|
62
65
|
}
|
|
63
66
|
declare function parseCLI(argv: string | string[], config?: CliParseOptions): {
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
filter: string[]
|
|
68
|
+
options: CliOptions
|
|
66
69
|
};
|
|
67
70
|
|
|
68
71
|
declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number): ApiConfig | undefined;
|
|
@@ -70,12 +73,12 @@ declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(
|
|
|
70
73
|
declare function createVitest(mode: VitestRunMode, options: UserConfig, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
71
74
|
|
|
72
75
|
declare class FilesNotFoundError extends Error {
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
code: string;
|
|
77
|
+
constructor(mode: "test" | "benchmark");
|
|
75
78
|
}
|
|
76
79
|
declare class GitNotFoundError extends Error {
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
code: string;
|
|
81
|
+
constructor();
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
/** @deprecated use `TestProject` instead */
|
|
@@ -84,23 +87,23 @@ type GlobalSetupContext = TestProject;
|
|
|
84
87
|
declare function VitestPlugin(options?: UserConfig, ctx?: Vitest): Promise<Plugin[]>;
|
|
85
88
|
|
|
86
89
|
declare function resolveConfig(options?: UserConfig, viteOverrides?: UserConfig$1): Promise<{
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
vitestConfig: ResolvedConfig
|
|
91
|
+
viteConfig: ResolvedConfig$1
|
|
89
92
|
}>;
|
|
90
93
|
|
|
91
94
|
declare function resolveFsAllow(projectRoot: string, rootConfigFile: string | false | undefined): string[];
|
|
92
95
|
|
|
93
96
|
interface MethodsOptions {
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
cacheFs?: boolean;
|
|
98
|
+
collect?: boolean;
|
|
96
99
|
}
|
|
97
100
|
declare function createMethodsRPC(project: TestProject, options?: MethodsOptions): RuntimeRPC;
|
|
98
101
|
|
|
99
102
|
declare class BaseSequencer implements TestSequencer {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
protected ctx: Vitest;
|
|
104
|
+
constructor(ctx: Vitest);
|
|
105
|
+
shard(files: TestSpecification[]): Promise<TestSpecification[]>;
|
|
106
|
+
sort(files: TestSpecification[]): Promise<TestSpecification[]>;
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
declare function registerConsoleShortcuts(ctx: Vitest, stdin: NodeJS.ReadStream | undefined, stdout: NodeJS.WriteStream | Writable): () => void;
|
|
@@ -119,13 +122,13 @@ declare const createServer: typeof createServer$1;
|
|
|
119
122
|
declare const createViteServer: typeof createServer$1;
|
|
120
123
|
|
|
121
124
|
/**
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
* @deprecated Use `TestModule` instead
|
|
126
|
+
*/
|
|
124
127
|
declare const TestFile: typeof TestModule;
|
|
125
128
|
|
|
126
129
|
/**
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
* @deprecated Use `ModuleDiagnostic` instead
|
|
131
|
+
*/
|
|
129
132
|
type FileDiagnostic = ModuleDiagnostic;
|
|
130
133
|
|
|
131
134
|
export { ApiConfig, BaseSequencer, type CliParseOptions, type FileDiagnostic, GitNotFoundError, type GlobalSetupContext, ModuleDiagnostic, ResolvedConfig, TestFile, TestModule, TestProject, TestSequencer, TestSpecification, FilesNotFoundError as TestsNotFoundError, UserConfig, Vitest, VitestOptions, VitestPlugin, VitestRunMode, TestProject as WorkspaceProject, createDebugger, createMethodsRPC, createServer, createViteLogger, createViteServer, createVitest, distDir, isValidApiRequest, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest, version };
|
package/dist/node.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { resolveConfig as resolveConfig$1, mergeConfig, createServer as createServer$1 } from 'vite';
|
|
2
2
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
3
|
-
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.
|
|
4
|
-
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.
|
|
5
|
-
export { p as parseCLI } from './chunks/cac.
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
3
|
+
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.Ckwz_xSb.js';
|
|
4
|
+
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.Ckwz_xSb.js';
|
|
5
|
+
export { p as parseCLI } from './chunks/cac.CeVHgzve.js';
|
|
6
|
+
import { r as resolveConfig$2 } from './chunks/coverage.gV8doR2Y.js';
|
|
7
|
+
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.gV8doR2Y.js';
|
|
8
8
|
import { slash } from '@vitest/utils';
|
|
9
9
|
import { f as findUp } from './chunks/index.DBIGubLC.js';
|
|
10
10
|
import { resolve } from 'pathe';
|
|
11
|
-
import { c as configFiles } from './chunks/constants.
|
|
11
|
+
import { c as configFiles } from './chunks/constants.DTYd6dNH.js';
|
|
12
12
|
export { distDir, rootDir } from './path.js';
|
|
13
13
|
import createDebug from 'debug';
|
|
14
14
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
15
15
|
import 'node:fs';
|
|
16
|
-
import './chunks/coverage.
|
|
16
|
+
import './chunks/coverage.A3sS5-Wm.js';
|
|
17
17
|
import 'node:path';
|
|
18
18
|
import '@vitest/snapshot/manager';
|
|
19
19
|
import 'vite-node/client';
|
|
20
20
|
import 'vite-node/server';
|
|
21
21
|
import './chunks/index.68735LiX.js';
|
|
22
|
-
import './chunks/index.
|
|
22
|
+
import './chunks/index.B8tIoLPT.js';
|
|
23
23
|
import 'tinyrainbow';
|
|
24
24
|
import './chunks/utils.bLM2atbD.js';
|
|
25
25
|
import 'node:util';
|
|
26
26
|
import 'node:perf_hooks';
|
|
27
27
|
import '@vitest/utils/source-map';
|
|
28
|
-
import './chunks/
|
|
28
|
+
import './chunks/env.D4Lgay0q.js';
|
|
29
29
|
import 'std-env';
|
|
30
|
+
import './chunks/typechecker.BlF3eHsb.js';
|
|
30
31
|
import 'node:fs/promises';
|
|
31
32
|
import 'tinyexec';
|
|
32
33
|
import 'node:os';
|
|
@@ -50,14 +51,15 @@ import 'node:crypto';
|
|
|
50
51
|
import 'path';
|
|
51
52
|
import 'vite-node/utils';
|
|
52
53
|
import '@vitest/mocker/node';
|
|
54
|
+
import './chunks/defaults.C2Ndd9wx.js';
|
|
53
55
|
import 'magic-string';
|
|
54
56
|
import 'node:assert';
|
|
55
57
|
import '@vitest/utils/error';
|
|
56
58
|
import 'node:readline';
|
|
59
|
+
import 'util';
|
|
57
60
|
import 'node:process';
|
|
58
61
|
import 'node:v8';
|
|
59
62
|
import 'node:tty';
|
|
60
|
-
import 'util';
|
|
61
63
|
import 'node:events';
|
|
62
64
|
import 'tinypool';
|
|
63
65
|
import 'node:worker_threads';
|
|
@@ -88,6 +90,7 @@ async function resolveConfig(options = {}, viteOverrides = {}) {
|
|
|
88
90
|
updatedOptions,
|
|
89
91
|
config
|
|
90
92
|
);
|
|
93
|
+
await vitest.close();
|
|
91
94
|
return {
|
|
92
95
|
viteConfig: config,
|
|
93
96
|
vitestConfig
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aM as BaseReporter, ay as BasicReporter, aN as BenchmarkBuiltinReporters, az as BenchmarkReporter, aA as BenchmarkReportsMap, aO as BuiltinReporterOptions, aP as BuiltinReporters, aB as DefaultReporter, aC as DotReporter, aD as GithubActionsReporter, aE as HangingProcessReporter, aG as JUnitReporter, aQ as JsonAssertionResult, aF as JsonReporter, aR as JsonTestResult, aS as JsonTestResults, aw as ReportedHookContext, l as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ax as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.d.CqBhtcTq.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
|
-
import './chunks/environment.
|
|
3
|
+
import './chunks/environment.d.C8UItCbf.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:stream';
|
|
6
6
|
import 'vite';
|
|
7
|
+
import 'node:console';
|
|
7
8
|
import '@vitest/utils/source-map';
|
|
8
|
-
import './chunks/config.
|
|
9
|
+
import './chunks/config.d.DevWltVl.js';
|
|
9
10
|
import '@vitest/pretty-format';
|
|
10
11
|
import '@vitest/snapshot';
|
|
11
12
|
import '@vitest/snapshot/environment';
|
|
12
13
|
import '@vitest/utils/diff';
|
|
13
14
|
import 'vite-node';
|
|
14
15
|
import 'chai';
|
|
15
|
-
import './chunks/benchmark.
|
|
16
|
+
import './chunks/benchmark.d.BwvBVTda.js';
|
|
16
17
|
import '@vitest/runner/utils';
|
|
17
18
|
import 'tinybench';
|
|
19
|
+
import './chunks/coverage.d.S9RMNXIe.js';
|
|
20
|
+
import 'vite-node/client';
|
|
18
21
|
import '@vitest/snapshot/manager';
|
|
19
22
|
import 'node:fs';
|
package/dist/reporters.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.
|
|
1
|
+
export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.B8tIoLPT.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import '@vitest/runner/utils';
|
|
4
4
|
import 'pathe';
|
|
@@ -8,8 +8,9 @@ import 'node:util';
|
|
|
8
8
|
import '@vitest/utils';
|
|
9
9
|
import 'node:perf_hooks';
|
|
10
10
|
import '@vitest/utils/source-map';
|
|
11
|
-
import './chunks/
|
|
11
|
+
import './chunks/env.D4Lgay0q.js';
|
|
12
12
|
import 'std-env';
|
|
13
|
+
import './chunks/typechecker.BlF3eHsb.js';
|
|
13
14
|
import 'node:fs/promises';
|
|
14
15
|
import 'tinyexec';
|
|
15
16
|
import 'vite';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import * as tinybench from 'tinybench';
|
|
2
2
|
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, TestContext } from '@vitest/runner';
|
|
3
3
|
export { VitestRunner } from '@vitest/runner';
|
|
4
|
-
import {
|
|
4
|
+
import { a as SerializedConfig } from './chunks/config.d.DevWltVl.js';
|
|
5
5
|
import '@vitest/pretty-format';
|
|
6
6
|
import '@vitest/snapshot';
|
|
7
7
|
import '@vitest/snapshot/environment';
|
|
8
8
|
import '@vitest/utils/diff';
|
|
9
9
|
|
|
10
10
|
declare class NodeBenchmarkRunner implements VitestRunner {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
config: SerializedConfig;
|
|
12
|
+
private __vitest_executor;
|
|
13
|
+
constructor(config: SerializedConfig);
|
|
14
|
+
importTinybench(): Promise<typeof tinybench>;
|
|
15
|
+
importFile(filepath: string, source: VitestRunnerImportSource): unknown;
|
|
16
|
+
runSuite(suite: Suite): Promise<void>;
|
|
17
|
+
runTask(): Promise<void>;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
declare class VitestTestRunner implements VitestRunner {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
21
|
+
config: SerializedConfig;
|
|
22
|
+
private snapshotClient;
|
|
23
|
+
private workerState;
|
|
24
|
+
private __vitest_executor;
|
|
25
|
+
private cancelRun;
|
|
26
|
+
private assertionsErrors;
|
|
27
|
+
pool: string;
|
|
28
|
+
constructor(config: SerializedConfig);
|
|
29
|
+
importFile(filepath: string, source: VitestRunnerImportSource): unknown;
|
|
30
|
+
onCollectStart(file: File): void;
|
|
31
|
+
onAfterRunFiles(): void;
|
|
32
|
+
onAfterRunSuite(suite: Suite): Promise<void>;
|
|
33
|
+
onAfterRunTask(test: Task): void;
|
|
34
|
+
onCancel(_reason: CancelReason): void;
|
|
35
|
+
injectValue(key: string): any;
|
|
36
|
+
onBeforeRunTask(test: Task): Promise<void>;
|
|
37
|
+
onBeforeRunSuite(suite: Suite): Promise<void>;
|
|
38
|
+
onBeforeTryTask(test: Task): void;
|
|
39
|
+
onAfterTryTask(test: Task): void;
|
|
40
|
+
extendTaskContext(context: TestContext): TestContext;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export { NodeBenchmarkRunner, VitestTestRunner };
|
package/dist/runners.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { updateTask } from '@vitest/runner';
|
|
2
2
|
import { createDefer, getSafeTimers } from '@vitest/utils';
|
|
3
|
-
import { a as getBenchOptions, g as getBenchFn } from './chunks/benchmark.
|
|
3
|
+
import { a as getBenchOptions, g as getBenchFn } from './chunks/benchmark.DL72EVN-.js';
|
|
4
4
|
import { g as getWorkerState } from './chunks/utils.C8RiOc4B.js';
|
|
5
5
|
import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
|
|
6
6
|
import { getTests, getNames, getTestName } from '@vitest/runner/utils';
|
|
7
|
-
import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.
|
|
7
|
+
import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.nSCvwQ7l.js';
|
|
8
8
|
import { r as rpc } from './chunks/rpc.TVf73xOu.js';
|
|
9
9
|
import 'chai';
|
|
10
10
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
11
11
|
import '@vitest/snapshot';
|
|
12
12
|
import '@vitest/utils/error';
|
|
13
|
+
import '@vitest/spy';
|
|
13
14
|
import '@vitest/utils/source-map';
|
|
14
15
|
import './chunks/date.W2xKR2qe.js';
|
|
15
|
-
import '@vitest/spy';
|
|
16
16
|
import './chunks/index.68735LiX.js';
|
|
17
17
|
|
|
18
18
|
function createBenchmarkResult(name) {
|
|
@@ -224,7 +224,6 @@ class VitestTestRunner {
|
|
|
224
224
|
isExpectingAssertionsError: null,
|
|
225
225
|
expectedAssertionsNumber: null,
|
|
226
226
|
expectedAssertionsNumberErrorGen: null,
|
|
227
|
-
testPath: test.file.filepath,
|
|
228
227
|
currentTestName: getTestName(test),
|
|
229
228
|
snapshotState: this.snapshotClient.getSnapshotState(test.file.filepath)
|
|
230
229
|
},
|
package/dist/snapshot.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
|
2
2
|
export { SnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
3
3
|
|
|
4
4
|
declare class VitestNodeSnapshotEnvironment extends NodeSnapshotEnvironment {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
getHeader(): string;
|
|
6
|
+
resolvePath(filepath: string): Promise<string>;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { VitestNodeSnapshotEnvironment as VitestSnapshotEnvironment };
|
package/dist/suite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { g as getBenchFn, a as getBenchOptions } from './chunks/suite.
|
|
1
|
+
export { g as getBenchFn, a as getBenchOptions } from './chunks/suite.d.FvehnV49.js';
|
|
2
2
|
export { VitestRunner, VitestRunnerConfig, createTaskCollector, getCurrentSuite, getCurrentTest, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
|
|
3
3
|
export { createChainable } from '@vitest/runner/utils';
|
|
4
|
-
import './chunks/benchmark.
|
|
4
|
+
import './chunks/benchmark.d.BwvBVTda.js';
|
|
5
5
|
import 'tinybench';
|
package/dist/suite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as getBenchFn, a as getBenchOptions } from './chunks/benchmark.
|
|
1
|
+
export { g as getBenchFn, a as getBenchOptions } from './chunks/benchmark.DL72EVN-.js';
|
|
2
2
|
export { createTaskCollector, getCurrentSuite, getCurrentTest, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
|
|
3
3
|
export { createChainable } from '@vitest/runner/utils';
|
|
4
4
|
import '@vitest/utils';
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
2
|
+
import { r as runBaseTests } from '../chunks/base.DV59CbtV.js';
|
|
3
3
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.Cn0zI1t3.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
|
-
import '../chunks/execute.
|
|
5
|
+
import '../chunks/execute.eDH0aFFd.js';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:vm';
|
|
@@ -6,11 +6,10 @@ import util from 'node:util';
|
|
|
6
6
|
import { startTests, collectTests } from '@vitest/runner';
|
|
7
7
|
import { KNOWN_ASSET_TYPES } from 'vite-node/constants';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
|
-
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.
|
|
10
|
-
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/
|
|
11
|
-
import { V as VitestIndex } from '../chunks/index.
|
|
9
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.uXkkC4xl.js';
|
|
10
|
+
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.CPvtqi8q.js';
|
|
11
|
+
import { V as VitestIndex } from '../chunks/index.D7Ny8f_s.js';
|
|
12
12
|
import { c as closeInspector } from '../chunks/inspector.DKLceBVD.js';
|
|
13
|
-
import { s as setupCommonEnv } from '../chunks/setup-common.wObu9a36.js';
|
|
14
13
|
import { g as getWorkerState } from '../chunks/utils.C8RiOc4B.js';
|
|
15
14
|
import 'chai';
|
|
16
15
|
import 'node:path';
|
|
@@ -19,17 +18,18 @@ import 'node:url';
|
|
|
19
18
|
import '../chunks/rpc.TVf73xOu.js';
|
|
20
19
|
import '@vitest/utils';
|
|
21
20
|
import '../chunks/index.68735LiX.js';
|
|
22
|
-
import '../chunks/
|
|
21
|
+
import '../chunks/coverage.A3sS5-Wm.js';
|
|
22
|
+
import '@vitest/snapshot';
|
|
23
|
+
import '../chunks/run-once.2ogXb3JV.js';
|
|
24
|
+
import '../chunks/vi.nSCvwQ7l.js';
|
|
23
25
|
import '@vitest/expect';
|
|
24
26
|
import '@vitest/runner/utils';
|
|
25
27
|
import '../chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
26
|
-
import '@vitest/snapshot';
|
|
27
28
|
import '@vitest/utils/error';
|
|
29
|
+
import '@vitest/spy';
|
|
28
30
|
import '@vitest/utils/source-map';
|
|
29
31
|
import '../chunks/date.W2xKR2qe.js';
|
|
30
|
-
import '
|
|
31
|
-
import '../chunks/run-once.2ogXb3JV.js';
|
|
32
|
-
import '../chunks/benchmark.Cdu9hjj4.js';
|
|
32
|
+
import '../chunks/benchmark.DL72EVN-.js';
|
|
33
33
|
import 'expect-type';
|
|
34
34
|
|
|
35
35
|
async function run(method, files, config, executor) {
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
1
|
+
import { r as runBaseTests } from '../chunks/base.DV59CbtV.js';
|
|
2
2
|
import { a as createThreadsRpcOptions } from '../chunks/utils.Cn0zI1t3.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
|
-
import '../chunks/execute.
|
|
4
|
+
import '../chunks/execute.eDH0aFFd.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'node:vm';
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
2
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.Cn0zI1t3.js';
|
|
3
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
3
|
+
import { r as runVmTests } from '../chunks/vm.jEFQDlX_.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:vm';
|
|
@@ -13,7 +13,7 @@ import 'node:stream';
|
|
|
13
13
|
import 'tinyrainbow';
|
|
14
14
|
import '../chunks/date.W2xKR2qe.js';
|
|
15
15
|
import '../chunks/utils.C8RiOc4B.js';
|
|
16
|
-
import '../chunks/execute.
|
|
16
|
+
import '../chunks/execute.eDH0aFFd.js';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import '@vitest/utils/error';
|
|
19
19
|
import 'vite-node/client';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as createThreadsRpcOptions } from '../chunks/utils.Cn0zI1t3.js';
|
|
2
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
2
|
+
import { r as runVmTests } from '../chunks/vm.jEFQDlX_.js';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'node:vm';
|
|
@@ -12,7 +12,7 @@ import 'node:stream';
|
|
|
12
12
|
import 'tinyrainbow';
|
|
13
13
|
import '../chunks/date.W2xKR2qe.js';
|
|
14
14
|
import '../chunks/utils.C8RiOc4B.js';
|
|
15
|
-
import '../chunks/execute.
|
|
15
|
+
import '../chunks/execute.eDH0aFFd.js';
|
|
16
16
|
import 'node:fs';
|
|
17
17
|
import '@vitest/utils/error';
|
|
18
18
|
import 'vite-node/client';
|
package/dist/workers.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.
|
|
1
|
+
import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.C58isfFm.js';
|
|
2
2
|
import { Awaitable } from '@vitest/utils';
|
|
3
3
|
import * as v8 from 'v8';
|
|
4
|
-
import {
|
|
5
|
-
import { W as WorkerContext } from './chunks/worker.
|
|
4
|
+
import { a as SerializedConfig } from './chunks/config.d.DevWltVl.js';
|
|
5
|
+
import { W as WorkerContext } from './chunks/worker.d.CSFlSYJg.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import 'vite-node';
|
|
8
|
-
import './chunks/environment.
|
|
8
|
+
import './chunks/environment.d.C8UItCbf.js';
|
|
9
9
|
import '@vitest/snapshot';
|
|
10
10
|
import '@vitest/pretty-format';
|
|
11
11
|
import '@vitest/snapshot/environment';
|
|
@@ -17,22 +17,22 @@ declare function provideWorkerState(context: any, state: WorkerGlobalState): Wor
|
|
|
17
17
|
declare function run(ctx: ContextRPC): Promise<void>;
|
|
18
18
|
declare function collect(ctx: ContextRPC): Promise<void>;
|
|
19
19
|
|
|
20
|
-
declare function runBaseTests(method:
|
|
20
|
+
declare function runBaseTests(method: "run" | "collect", state: WorkerGlobalState): Promise<void>;
|
|
21
21
|
|
|
22
|
-
type WorkerRpcOptions = Pick<BirpcOptions<RuntimeRPC>,
|
|
22
|
+
type WorkerRpcOptions = Pick<BirpcOptions<RuntimeRPC>, "on" | "post" | "serialize" | "deserialize">;
|
|
23
23
|
interface VitestWorker {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
getRpcOptions: (ctx: ContextRPC) => WorkerRpcOptions;
|
|
25
|
+
runTests: (state: WorkerGlobalState) => Awaitable<unknown>;
|
|
26
|
+
collectTests: (state: WorkerGlobalState) => Awaitable<unknown>;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
declare function createThreadsRpcOptions({ port
|
|
29
|
+
declare function createThreadsRpcOptions({ port }: WorkerContext): WorkerRpcOptions;
|
|
30
30
|
declare function createForksRpcOptions(nodeV8: typeof v8): WorkerRpcOptions;
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
* Reverts the wrapping done by `utils/config-helpers.ts`'s `wrapSerializableConfig`
|
|
33
|
+
*/
|
|
34
34
|
declare function unwrapSerializableConfig(config: SerializedConfig): SerializedConfig;
|
|
35
35
|
|
|
36
|
-
declare function runVmTests(method:
|
|
36
|
+
declare function runVmTests(method: "run" | "collect", state: WorkerGlobalState): Promise<void>;
|
|
37
37
|
|
|
38
38
|
export { type VitestWorker, type WorkerRpcOptions, collect as collectVitestWorkerTests, createForksRpcOptions, createThreadsRpcOptions, provideWorkerState, runBaseTests, run as runVitestWorker, runVmTests, unwrapSerializableConfig };
|
package/dist/workers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { p as provideWorkerState } from './chunks/utils.C8RiOc4B.js';
|
|
2
2
|
export { collect as collectVitestWorkerTests, run as runVitestWorker } from './worker.js';
|
|
3
|
-
export { r as runBaseTests } from './chunks/base.
|
|
3
|
+
export { r as runBaseTests } from './chunks/base.DV59CbtV.js';
|
|
4
4
|
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.Cn0zI1t3.js';
|
|
5
|
-
export { r as runVmTests } from './chunks/vm.
|
|
5
|
+
export { r as runVmTests } from './chunks/vm.jEFQDlX_.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import '@vitest/utils/source-map';
|
|
@@ -16,7 +16,7 @@ import './chunks/inspector.DKLceBVD.js';
|
|
|
16
16
|
import 'node:module';
|
|
17
17
|
import './chunks/rpc.TVf73xOu.js';
|
|
18
18
|
import './chunks/index.68735LiX.js';
|
|
19
|
-
import './chunks/execute.
|
|
19
|
+
import './chunks/execute.eDH0aFFd.js';
|
|
20
20
|
import 'node:vm';
|
|
21
21
|
import '@vitest/utils/error';
|
|
22
22
|
import 'vite-node/utils';
|