vitest 2.1.2 → 2.1.4
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/LICENSE.md +320 -238
- package/dist/browser.d.ts +21 -21
- package/dist/browser.js +7 -7
- package/dist/chunks/{RandomSequencer.Bh5-tlNJ.js → RandomSequencer.CMRlh2v4.js} +143 -142
- package/dist/chunks/{base.tiemDJX6.js → base.C3xNdjV6.js} +3 -3
- package/dist/chunks/{benchmark.C8CRJYG4.js → benchmark.Cdu9hjj4.js} +2 -2
- package/dist/chunks/{benchmark.JVlTzojj.d.ts → benchmark.geERunq4.d.ts} +1 -1
- package/dist/chunks/{cac.B9PaPYY1.js → cac.DrfPaMvZ.js} +11 -10
- package/dist/chunks/{cli-api.CHxC4-U8.js → cli-api.CKrRYkw8.js} +3573 -3353
- package/dist/chunks/{console.DI3gHgtH.js → console.BYGVloWk.js} +3 -7
- package/dist/chunks/{coverage.zlNdAMHK.js → coverage.BoMDb1ip.js} +1 -1
- package/dist/chunks/{creator.Cf-MKt9i.js → creator.IIqd8RWT.js} +8 -8
- package/dist/chunks/{execute._eQQfgI8.js → execute.2pr0rHgK.js} +8 -6
- package/dist/chunks/{globals.HsM2o-0O.js → globals.Bp645TTJ.js} +8 -13
- package/dist/chunks/{index.BpSiYbpB.js → index.68735LiX.js} +28 -5
- package/dist/chunks/{index.BpojBOif.js → index.BJDntFik.js} +10 -10
- package/dist/chunks/{index.FcPVJkIQ.js → index.Bn81VaWg.js} +3828 -3790
- package/dist/chunks/{index.CPD77dLA.js → index.CqYx2Nsr.js} +7 -7
- package/dist/chunks/{index.Ckn0Cw1h.js → index.D3d79vc8.js} +6 -6
- package/dist/chunks/index.Dqe5k2Rk.js +54 -0
- package/dist/chunks/{node.Bx4JZjMG.js → node.AKq966Jp.js} +1 -5
- package/dist/chunks/{reporters.DAfKSDh5.d.ts → reporters.anwo7Y6a.d.ts} +1159 -1144
- package/dist/chunks/{resolveConfig.D1DENLPF.js → resolveConfig.DPmbhVlP.js} +2610 -2574
- package/dist/chunks/{rpc.B7Mfb-Yf.js → rpc.C3q9uwRX.js} +2 -2
- package/dist/chunks/{run-once.Sxe67Wng.js → run-once.2ogXb3JV.js} +1 -1
- package/dist/chunks/{runBaseTests.D-Gcin7G.js → runBaseTests.Dm-659zB.js} +21 -25
- package/dist/chunks/{setup-common.DF96bIYE.js → setup-common.DDmVKp6O.js} +3 -3
- package/dist/chunks/{suite.BMWOKiTe.d.ts → suite.B2jumIFP.d.ts} +2 -2
- package/dist/chunks/{utils.CY6Spixo.js → utils.BB4zjzR8.js} +2 -2
- package/dist/chunks/utils.C8RiOc4B.js +77 -0
- package/dist/chunks/{vi.DUs2eKik.js → vi.JMQoNY_Z.js} +94 -139
- package/dist/chunks/{vite.8fk186v-.d.ts → vite.BdBj-UWY.d.ts} +1 -1
- package/dist/chunks/{vm.CPXwWp4C.js → vm.jpyrB0xy.js} +5 -8
- package/dist/chunks/{worker.Chrs-_NL.d.ts → worker.BAlI9hII.d.ts} +50 -27
- package/dist/chunks/{worker.Qtv8v5nL.d.ts → worker.DHnGaO2M.d.ts} +1 -1
- package/dist/cli.js +3 -4
- package/dist/config.cjs +4 -4
- package/dist/config.d.ts +24 -19
- package/dist/config.js +4 -4
- package/dist/coverage.d.ts +72 -35
- package/dist/coverage.js +256 -118
- package/dist/environments.d.ts +2 -2
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +53 -53
- package/dist/execute.js +7 -6
- package/dist/index.d.ts +92 -1099
- package/dist/index.js +7 -18
- package/dist/node.d.ts +43 -41
- package/dist/node.js +23 -28
- package/dist/path.js +1 -1
- package/dist/reporters.d.ts +10 -10
- package/dist/reporters.js +12 -18
- package/dist/runners.d.ts +12 -19
- package/dist/runners.js +142 -148
- package/dist/snapshot.js +2 -6
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +2 -6
- package/dist/worker.js +5 -6
- package/dist/workers/forks.js +9 -8
- package/dist/workers/runVmTests.js +16 -20
- package/dist/workers/threads.js +9 -8
- package/dist/workers/vmForks.js +9 -12
- package/dist/workers/vmThreads.js +9 -12
- package/dist/workers.d.ts +13 -13
- package/dist/workers.js +14 -18
- package/package.json +27 -27
- package/dist/chunks/base.DwXGwWst.js +0 -89
- package/dist/chunks/env.CmHVDJnw.js +0 -7
- package/dist/chunks/index.CxRxs566.js +0 -23
- package/dist/chunks/index.mAqbj9F9.js +0 -140
- package/dist/chunks/tasks.BZnCS9aT.js +0 -18
- package/dist/chunks/utils.Ck2hJTRs.js +0 -23
- package/dist/chunks/{environment.CzISCQ7o.d.ts → environment.LoooBwUu.d.ts} +24 -24
- package/dist/chunks/{index.lVXYBqEP.js → index.BMoXz_-n.js} +186 -186
package/dist/index.js
CHANGED
|
@@ -1,30 +1,19 @@
|
|
|
1
|
+
export { c as createExpect, a as expect, v as vi, b as vitest } from './chunks/vi.JMQoNY_Z.js';
|
|
2
|
+
export { b as assertType, g as getRunningMode, i as inject, a as isWatchMode } from './chunks/index.Dqe5k2Rk.js';
|
|
3
|
+
export { i as isFirstRun, a as runOnce } from './chunks/run-once.2ogXb3JV.js';
|
|
4
|
+
export { b as bench } from './chunks/benchmark.Cdu9hjj4.js';
|
|
5
|
+
export { expectTypeOf } from 'expect-type';
|
|
1
6
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
2
|
-
export { b as bench } from './chunks/benchmark.C8CRJYG4.js';
|
|
3
|
-
import { d as distExports } from './chunks/index.mAqbj9F9.js';
|
|
4
|
-
export { a as assertType, g as getRunningMode, b as inject, i as isWatchMode } from './chunks/index.mAqbj9F9.js';
|
|
5
|
-
export { i as isFirstRun, a as runOnce } from './chunks/run-once.Sxe67Wng.js';
|
|
6
|
-
export { c as createExpect, a as expect, v as vi, b as vitest } from './chunks/vi.DUs2eKik.js';
|
|
7
7
|
import * as chai from 'chai';
|
|
8
8
|
export { chai };
|
|
9
9
|
export { assert, should } from 'chai';
|
|
10
|
+
import '@vitest/expect';
|
|
10
11
|
import '@vitest/runner/utils';
|
|
12
|
+
import './chunks/utils.C8RiOc4B.js';
|
|
11
13
|
import '@vitest/utils';
|
|
12
|
-
import './chunks/index.CxRxs566.js';
|
|
13
|
-
import 'pathe';
|
|
14
|
-
import './chunks/utils.Ck2hJTRs.js';
|
|
15
|
-
import './chunks/env.CmHVDJnw.js';
|
|
16
|
-
import 'std-env';
|
|
17
14
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
18
|
-
import '@vitest/expect';
|
|
19
15
|
import '@vitest/snapshot';
|
|
20
16
|
import '@vitest/utils/error';
|
|
21
|
-
import './chunks/tasks.BZnCS9aT.js';
|
|
22
17
|
import '@vitest/utils/source-map';
|
|
23
|
-
import './chunks/base.DwXGwWst.js';
|
|
24
18
|
import './chunks/date.W2xKR2qe.js';
|
|
25
19
|
import '@vitest/spy';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var expectTypeOf = distExports.expectTypeOf;
|
|
30
|
-
export { expectTypeOf };
|
package/dist/node.d.ts
CHANGED
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as VitestRunMode, H as VitestOptions, V as Vitest, z as UserConfig$1, A as ApiConfig, L as Logger, E as ResolvedConfig$1, J as WorkspaceProject, K as TestSequencer, M as WorkspaceSpec, N as TestModule, O as ModuleDiagnostic } from './chunks/reporters.anwo7Y6a.js';
|
|
2
|
+
export { B as BaseCoverageOptions, G as BenchmarkUserOptions, ad as BrowserBuiltinProvider, ae as BrowserCommand, af as BrowserCommandContext, s as BrowserConfigOptions, ag as BrowserOrchestrator, ah as BrowserProvider, ai as BrowserProviderInitializationOptions, aj as BrowserProviderModule, ak as BrowserProviderOptions, r as BrowserScript, al as BrowserServer, am as BrowserServerState, an as BrowserServerStateContext, t as BuiltinEnvironment, ao as CDPSession, v as CSSModuleScopeStrategy, o as CoverageIstanbulOptions, n as CoverageOptions, C as CoverageProvider, b as CoverageProviderModule, l as CoverageReporter, c as CoverageV8Options, p as CustomProviderOptions, D as DepsOptimizationOptions, $ as HTMLOptions, I as InlineConfig, a1 as JUnitOptions, a0 as JsonOptions, P as Pool, u as PoolOptions, X as ProcessPool, F as ProjectConfig, a as ReportContext, ap as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aq as ResolvedProjectConfig, _ as SerializedTestProject, a4 as TaskOptions, a2 as TestCase, a5 as TestCollection, a6 as TestDiagnostic, Z as TestProject, a7 as TestResult, a8 as TestResultFailed, a9 as TestResultPassed, aa as TestResultSkipped, ab as TestSequencerConstructor, ac as TestSpecification, a3 as TestSuite, x as TransformModePatterns, h as TypeCheckCollectLineNumbers, i as TypeCheckCollectLines, k as TypeCheckContext, T as TypeCheckErrorInfo, g as TypeCheckRawErrorsMap, j as TypeCheckRootAndTarget, y as TypecheckConfig, U as UserWorkspaceConfig, f as VitestEnvironment, Q as VitestPackageInstaller, Y as getFilePoolName } from './chunks/reporters.anwo7Y6a.js';
|
|
3
|
+
import { UserConfig, ResolvedConfig, Plugin, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
|
|
2
4
|
import * as vite from 'vite';
|
|
3
5
|
export { vite as Vite };
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
6
|
+
export { isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
7
|
+
import { P as ProvidedContext } from './chunks/environment.LoooBwUu.js';
|
|
8
|
+
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions, O as OnServerRestartHandler } from './chunks/environment.LoooBwUu.js';
|
|
9
|
+
import { R as RuntimeRPC } from './chunks/worker.BAlI9hII.js';
|
|
7
10
|
import { Writable } from 'node:stream';
|
|
8
|
-
|
|
9
|
-
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions, O as OnServerRestartHandler } from './chunks/environment.CzISCQ7o.js';
|
|
10
|
-
import { R as RuntimeRPC } from './chunks/worker.Chrs-_NL.js';
|
|
11
|
+
export { W as WorkerContext } from './chunks/worker.DHnGaO2M.js';
|
|
11
12
|
import createDebug from 'debug';
|
|
12
|
-
export { W as WorkerContext } from './chunks/worker.Qtv8v5nL.js';
|
|
13
|
-
export { SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
14
13
|
export { b as RuntimeConfig } from './chunks/config.Crbj2GAb.js';
|
|
14
|
+
export { SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
15
15
|
import '@vitest/pretty-format';
|
|
16
|
-
import 'vite-node';
|
|
17
16
|
import '@vitest/snapshot';
|
|
18
|
-
import 'vite-node
|
|
19
|
-
import '
|
|
20
|
-
import 'vite-node/server';
|
|
17
|
+
import 'vite-node';
|
|
18
|
+
import 'chai';
|
|
21
19
|
import '@vitest/utils';
|
|
22
20
|
import '@vitest/utils/source-map';
|
|
21
|
+
import 'vite-node/client';
|
|
22
|
+
import 'vite-node/server';
|
|
23
|
+
import '@vitest/snapshot/manager';
|
|
23
24
|
import 'node:fs';
|
|
24
|
-
import '
|
|
25
|
-
import './chunks/benchmark.JVlTzojj.js';
|
|
25
|
+
import './chunks/benchmark.geERunq4.js';
|
|
26
26
|
import '@vitest/runner/utils';
|
|
27
27
|
import 'tinybench';
|
|
28
28
|
import 'node:worker_threads';
|
|
29
29
|
import '@vitest/snapshot/environment';
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
declare function VitestPlugin(options?: UserConfig, ctx?: Vitest): Promise<Plugin[]>;
|
|
34
|
-
|
|
35
|
-
interface CliOptions extends UserConfig {
|
|
31
|
+
interface CliOptions extends UserConfig$1 {
|
|
36
32
|
/**
|
|
37
33
|
* Override the watch mode
|
|
38
34
|
*/
|
|
@@ -55,7 +51,7 @@ interface CliOptions extends UserConfig {
|
|
|
55
51
|
*
|
|
56
52
|
* Returns a Vitest instance if initialized successfully.
|
|
57
53
|
*/
|
|
58
|
-
declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig
|
|
54
|
+
declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig, vitestOptions?: VitestOptions): Promise<Vitest | undefined>;
|
|
59
55
|
|
|
60
56
|
interface CLIOptions {
|
|
61
57
|
allowUnknownOptions?: boolean;
|
|
@@ -65,24 +61,10 @@ declare function parseCLI(argv: string | string[], config?: CLIOptions): {
|
|
|
65
61
|
options: CliOptions;
|
|
66
62
|
};
|
|
67
63
|
|
|
68
|
-
declare function
|
|
69
|
-
|
|
70
|
-
interface GlobalSetupContext {
|
|
71
|
-
config: ResolvedConfig;
|
|
72
|
-
provide: <T extends keyof ProvidedContext & string>(key: T, value: ProvidedContext[T]) => void;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface MethodsOptions {
|
|
76
|
-
cacheFs?: boolean;
|
|
77
|
-
}
|
|
78
|
-
declare function createMethodsRPC(project: WorkspaceProject, options?: MethodsOptions): RuntimeRPC;
|
|
64
|
+
declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig$1>(options: Options, defaultPort: number): ApiConfig | undefined;
|
|
65
|
+
declare function resolveConfig(mode: VitestRunMode, options: UserConfig$1, viteConfig: ResolvedConfig, logger: Logger): ResolvedConfig$1;
|
|
79
66
|
|
|
80
|
-
declare function
|
|
81
|
-
|
|
82
|
-
declare function resolveFsAllow(projectRoot: string, rootConfigFile: string | false | undefined): string[];
|
|
83
|
-
|
|
84
|
-
declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number): ApiConfig | undefined;
|
|
85
|
-
declare function resolveConfig(mode: VitestRunMode, options: UserConfig, viteConfig: ResolvedConfig$1, logger: Logger): ResolvedConfig;
|
|
67
|
+
declare function createVitest(mode: VitestRunMode, options: UserConfig$1, viteOverrides?: UserConfig, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
86
68
|
|
|
87
69
|
declare class FilesNotFoundError extends Error {
|
|
88
70
|
code: string;
|
|
@@ -93,8 +75,19 @@ declare class GitNotFoundError extends Error {
|
|
|
93
75
|
constructor();
|
|
94
76
|
}
|
|
95
77
|
|
|
96
|
-
|
|
97
|
-
|
|
78
|
+
interface GlobalSetupContext {
|
|
79
|
+
config: ResolvedConfig$1;
|
|
80
|
+
provide: <T extends keyof ProvidedContext & string>(key: T, value: ProvidedContext[T]) => void;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare function VitestPlugin(options?: UserConfig$1, ctx?: Vitest): Promise<Plugin[]>;
|
|
84
|
+
|
|
85
|
+
declare function resolveFsAllow(projectRoot: string, rootConfigFile: string | false | undefined): string[];
|
|
86
|
+
|
|
87
|
+
interface MethodsOptions {
|
|
88
|
+
cacheFs?: boolean;
|
|
89
|
+
}
|
|
90
|
+
declare function createMethodsRPC(project: WorkspaceProject, options?: MethodsOptions): RuntimeRPC;
|
|
98
91
|
|
|
99
92
|
declare class BaseSequencer implements TestSequencer {
|
|
100
93
|
protected ctx: Vitest;
|
|
@@ -103,6 +96,15 @@ declare class BaseSequencer implements TestSequencer {
|
|
|
103
96
|
sort(files: WorkspaceSpec[]): Promise<WorkspaceSpec[]>;
|
|
104
97
|
}
|
|
105
98
|
|
|
99
|
+
declare function registerConsoleShortcuts(ctx: Vitest, stdin: NodeJS.ReadStream | undefined, stdout: NodeJS.WriteStream | Writable): () => void;
|
|
100
|
+
|
|
101
|
+
declare function createViteLogger(console: Logger, level?: LogLevel, options?: LoggerOptions): Logger$1;
|
|
102
|
+
|
|
103
|
+
declare const rootDir: string;
|
|
104
|
+
declare const distDir: string;
|
|
105
|
+
|
|
106
|
+
declare function createDebugger(namespace: `vitest:${string}`): createDebug.Debugger | undefined;
|
|
107
|
+
|
|
106
108
|
/** @deprecated use `createViteServer` instead */
|
|
107
109
|
declare const createServer: typeof createServer$1;
|
|
108
110
|
declare const createViteServer: typeof createServer$1;
|
|
@@ -117,4 +119,4 @@ declare const TestFile: typeof TestModule;
|
|
|
117
119
|
*/
|
|
118
120
|
type FileDiagnostic = ModuleDiagnostic;
|
|
119
121
|
|
|
120
|
-
export { ApiConfig, BaseSequencer, type FileDiagnostic, GitNotFoundError, type GlobalSetupContext, ModuleDiagnostic, ResolvedConfig, TestFile, TestModule, TestSequencer, FilesNotFoundError as TestsNotFoundError, UserConfig, Vitest, VitestPlugin, VitestRunMode, WorkspaceProject, WorkspaceSpec, createDebugger, createMethodsRPC, createServer, createViteServer, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest };
|
|
122
|
+
export { ApiConfig, BaseSequencer, type FileDiagnostic, GitNotFoundError, type GlobalSetupContext, ModuleDiagnostic, ResolvedConfig$1 as ResolvedConfig, TestFile, TestModule, TestSequencer, FilesNotFoundError as TestsNotFoundError, UserConfig$1 as UserConfig, Vitest, VitestPlugin, VitestRunMode, WorkspaceProject, WorkspaceSpec, createDebugger, createMethodsRPC, createServer, createViteLogger, createViteServer, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest };
|
package/dist/node.js
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
import { createServer as createServer$1 } from 'vite';
|
|
2
|
-
export {
|
|
3
|
-
import { f as TestModule } from './chunks/index.
|
|
4
|
-
export { e as TestCase, i as TestProject, g as TestSuite } from './chunks/index.
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
|
|
2
|
+
export { isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
3
|
+
import { f as TestModule } from './chunks/index.Bn81VaWg.js';
|
|
4
|
+
export { e as TestCase, i as TestProject, g as TestSuite } from './chunks/index.Bn81VaWg.js';
|
|
5
|
+
export { p as parseCLI } from './chunks/cac.DrfPaMvZ.js';
|
|
6
|
+
export { G as GitNotFoundError, T as TestSpecification, F as TestsNotFoundError, V as VitestPackageInstaller, a as VitestPlugin, d as createViteLogger, c as createVitest, b as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.CKrRYkw8.js';
|
|
7
|
+
export { d as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig, b as resolveConfig } from './chunks/resolveConfig.DPmbhVlP.js';
|
|
8
|
+
export { B as BaseSequencer } from './chunks/RandomSequencer.CMRlh2v4.js';
|
|
9
9
|
export { distDir, rootDir } from './path.js';
|
|
10
|
-
|
|
10
|
+
import createDebug from 'debug';
|
|
11
11
|
import 'node:fs';
|
|
12
|
-
import 'tinyrainbow';
|
|
13
|
-
import 'pathe';
|
|
14
|
-
import './chunks/tasks.BZnCS9aT.js';
|
|
15
12
|
import '@vitest/runner/utils';
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import './chunks/utils.CY6Spixo.js';
|
|
13
|
+
import 'pathe';
|
|
14
|
+
import 'tinyrainbow';
|
|
15
|
+
import './chunks/utils.BB4zjzR8.js';
|
|
20
16
|
import 'node:util';
|
|
21
|
-
import '
|
|
17
|
+
import '@vitest/utils';
|
|
22
18
|
import 'node:perf_hooks';
|
|
23
19
|
import '@vitest/utils/source-map';
|
|
24
|
-
import '
|
|
25
|
-
import '
|
|
26
|
-
import 'node:os';
|
|
20
|
+
import 'std-env';
|
|
21
|
+
import 'node:fs/promises';
|
|
27
22
|
import 'node:stream';
|
|
28
23
|
import 'node:console';
|
|
29
24
|
import 'node:process';
|
|
@@ -31,17 +26,17 @@ import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
|
31
26
|
import 'assert';
|
|
32
27
|
import 'events';
|
|
33
28
|
import 'node:module';
|
|
34
|
-
import 'node:
|
|
35
|
-
import './chunks/
|
|
36
|
-
import './chunks/
|
|
29
|
+
import 'node:os';
|
|
30
|
+
import './chunks/constants.fzPh7AOq.js';
|
|
31
|
+
import './chunks/coverage.BoMDb1ip.js';
|
|
37
32
|
import 'node:path';
|
|
33
|
+
import './chunks/index.BJDntFik.js';
|
|
38
34
|
import 'node:url';
|
|
39
35
|
import 'readline';
|
|
40
|
-
import './chunks/constants.fzPh7AOq.js';
|
|
41
|
-
import 'vite-node/client';
|
|
42
36
|
import '@vitest/snapshot/manager';
|
|
37
|
+
import 'vite-node/client';
|
|
43
38
|
import 'vite-node/server';
|
|
44
|
-
import './chunks/index.
|
|
39
|
+
import './chunks/index.68735LiX.js';
|
|
45
40
|
import 'stream';
|
|
46
41
|
import 'zlib';
|
|
47
42
|
import 'buffer';
|
|
@@ -51,12 +46,12 @@ import 'http';
|
|
|
51
46
|
import 'net';
|
|
52
47
|
import 'tls';
|
|
53
48
|
import 'url';
|
|
49
|
+
import 'os';
|
|
54
50
|
import 'path';
|
|
55
51
|
import 'fs';
|
|
56
|
-
import 'node:crypto';
|
|
57
52
|
import 'vite-node/utils';
|
|
58
|
-
import 'magic-string';
|
|
59
53
|
import '@vitest/mocker/node';
|
|
54
|
+
import 'magic-string';
|
|
60
55
|
import 'node:worker_threads';
|
|
61
56
|
import 'node:readline';
|
|
62
57
|
import 'node:assert';
|
|
@@ -65,7 +60,7 @@ import 'util';
|
|
|
65
60
|
import 'node:events';
|
|
66
61
|
import 'tinypool';
|
|
67
62
|
import 'tinyexec';
|
|
68
|
-
import '
|
|
63
|
+
import 'node:crypto';
|
|
69
64
|
|
|
70
65
|
function createDebugger(namespace) {
|
|
71
66
|
const debug = createDebug(namespace);
|
package/dist/path.js
CHANGED
package/dist/reporters.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '@vitest/runner';
|
|
3
|
-
import 'vite';
|
|
4
|
-
import '@vitest/pretty-format';
|
|
1
|
+
export { aB as BaseReporter, ar as BasicReporter, aL as BenchmarkBuiltinReporters, aK as BenchmarkReportsMap, aG as BuiltinReporterOptions, aF as BuiltinReporters, as as DefaultReporter, at as DotReporter, aD as FileDiagnostic, au as GithubActionsReporter, av as HangingProcessReporter, ax as JUnitReporter, aH as JsonAssertionResult, aw as JsonReporter, aI as JsonTestResult, aJ as JsonTestResults, q as Reporter, aE as ReportersMap, ay as TapFlatReporter, az as TapReporter, a4 as TaskOptions, a2 as TestCase, a5 as TestCollection, a6 as TestDiagnostic, aC as TestFile, N as TestModule, Z as TestProject, a7 as TestResult, a8 as TestResultFailed, a9 as TestResultPassed, aa as TestResultSkipped, a3 as TestSuite, aA as VerboseReporter } from './chunks/reporters.anwo7Y6a.js';
|
|
5
2
|
import './chunks/config.Crbj2GAb.js';
|
|
3
|
+
import '@vitest/pretty-format';
|
|
4
|
+
import '@vitest/runner';
|
|
6
5
|
import '@vitest/snapshot';
|
|
7
6
|
import '@vitest/snapshot/environment';
|
|
7
|
+
import 'vite';
|
|
8
8
|
import 'vite-node';
|
|
9
|
-
import '
|
|
9
|
+
import 'chai';
|
|
10
|
+
import './chunks/environment.LoooBwUu.js';
|
|
10
11
|
import 'node:stream';
|
|
11
|
-
import 'vite-node/client';
|
|
12
|
-
import '@vitest/snapshot/manager';
|
|
13
|
-
import 'vite-node/server';
|
|
14
12
|
import '@vitest/utils';
|
|
15
13
|
import '@vitest/utils/source-map';
|
|
14
|
+
import 'vite-node/client';
|
|
15
|
+
import 'vite-node/server';
|
|
16
|
+
import '@vitest/snapshot/manager';
|
|
16
17
|
import 'node:fs';
|
|
17
|
-
import '
|
|
18
|
-
import './chunks/benchmark.JVlTzojj.js';
|
|
18
|
+
import './chunks/benchmark.geERunq4.js';
|
|
19
19
|
import '@vitest/runner/utils';
|
|
20
20
|
import 'tinybench';
|
package/dist/reporters.js
CHANGED
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
export { B as BasicReporter, h as BenchmarkReportsMap, D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap,
|
|
1
|
+
export { B as BasicReporter, h as BenchmarkReportsMap, 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, e as TestCase, d as TestFile, f as TestModule, g as TestSuite, V as VerboseReporter } from './chunks/index.Bn81VaWg.js';
|
|
2
2
|
import 'node:fs';
|
|
3
|
-
import 'tinyrainbow';
|
|
4
|
-
import 'pathe';
|
|
5
|
-
import './chunks/tasks.BZnCS9aT.js';
|
|
6
3
|
import '@vitest/runner/utils';
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import './chunks/utils.CY6Spixo.js';
|
|
4
|
+
import 'pathe';
|
|
5
|
+
import 'tinyrainbow';
|
|
6
|
+
import './chunks/utils.BB4zjzR8.js';
|
|
11
7
|
import 'node:util';
|
|
12
|
-
import '
|
|
8
|
+
import '@vitest/utils';
|
|
13
9
|
import 'node:perf_hooks';
|
|
14
10
|
import '@vitest/utils/source-map';
|
|
15
|
-
import './chunks/
|
|
16
|
-
import '
|
|
17
|
-
import './chunks/RandomSequencer.Bh5-tlNJ.js';
|
|
11
|
+
import './chunks/RandomSequencer.CMRlh2v4.js';
|
|
12
|
+
import 'std-env';
|
|
18
13
|
import 'node:fs/promises';
|
|
19
14
|
import 'tinyexec';
|
|
20
|
-
import '
|
|
15
|
+
import 'vite';
|
|
21
16
|
import 'node:os';
|
|
22
|
-
import '
|
|
17
|
+
import 'node:url';
|
|
18
|
+
import 'node:path';
|
|
19
|
+
import 'node:module';
|
|
23
20
|
import 'fs';
|
|
24
|
-
import 'module';
|
|
25
|
-
import 'vite';
|
|
26
|
-
import 'node:crypto';
|
|
27
21
|
import 'vite-node/utils';
|
|
22
|
+
import 'node:crypto';
|
|
28
23
|
import 'node:stream';
|
|
29
24
|
import 'node:console';
|
|
30
25
|
import 'node:process';
|
|
31
26
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
32
27
|
import 'assert';
|
|
33
28
|
import 'events';
|
|
34
|
-
import 'node:module';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import { VitestRunner, VitestRunnerImportSource, File, Suite, Task, CancelReason, Test, Custom, TaskContext, ExtendedContext } from '@vitest/runner';
|
|
2
|
-
import { S as SerializedConfig } from './chunks/config.Crbj2GAb.js';
|
|
3
1
|
import * as tinybench from 'tinybench';
|
|
4
|
-
import {
|
|
2
|
+
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, Custom, TaskContext, ExtendedContext } from '@vitest/runner';
|
|
3
|
+
import { S as SerializedConfig } from './chunks/config.Crbj2GAb.js';
|
|
5
4
|
import '@vitest/pretty-format';
|
|
6
5
|
import '@vitest/snapshot';
|
|
7
6
|
import '@vitest/snapshot/environment';
|
|
8
7
|
|
|
8
|
+
declare class NodeBenchmarkRunner implements VitestRunner {
|
|
9
|
+
config: SerializedConfig;
|
|
10
|
+
private __vitest_executor;
|
|
11
|
+
constructor(config: SerializedConfig);
|
|
12
|
+
importTinybench(): Promise<typeof tinybench>;
|
|
13
|
+
importFile(filepath: string, source: VitestRunnerImportSource): unknown;
|
|
14
|
+
runSuite(suite: Suite): Promise<void>;
|
|
15
|
+
runTask(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
declare class VitestTestRunner implements VitestRunner {
|
|
10
19
|
config: SerializedConfig;
|
|
11
20
|
private snapshotClient;
|
|
@@ -29,20 +38,4 @@ declare class VitestTestRunner implements VitestRunner {
|
|
|
29
38
|
extendTaskContext<T extends Test | Custom>(context: TaskContext<T>): ExtendedContext<T>;
|
|
30
39
|
}
|
|
31
40
|
|
|
32
|
-
declare class NodeBenchmarkRunner implements VitestRunner {
|
|
33
|
-
config: SerializedConfig;
|
|
34
|
-
private __vitest_executor;
|
|
35
|
-
constructor(config: SerializedConfig);
|
|
36
|
-
importTinybench(): Promise<{
|
|
37
|
-
default: typeof tinybench;
|
|
38
|
-
Bench: typeof tinybench.Bench;
|
|
39
|
-
Task: typeof Task$1;
|
|
40
|
-
hrtimeNow: () => number;
|
|
41
|
-
now: () => number;
|
|
42
|
-
}>;
|
|
43
|
-
importFile(filepath: string, source: VitestRunnerImportSource): unknown;
|
|
44
|
-
runSuite(suite: Suite): Promise<void>;
|
|
45
|
-
runTask(): Promise<void>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
41
|
export { NodeBenchmarkRunner, VitestTestRunner };
|