vitest 2.1.5 → 2.2.0-beta.2
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 +0 -75
- package/dist/browser.d.ts +11 -11
- package/dist/browser.js +1 -1
- package/dist/chunks/{RandomSequencer.CMRlh2v4.js → RandomSequencer.BPedXEug.js} +1 -0
- package/dist/chunks/{base.BZZh4cSm.js → base.BS0HhLXd.js} +1 -1
- package/dist/chunks/{benchmark.geERunq4.d.ts → benchmark.CFFwLv-O.d.ts} +2 -2
- package/dist/chunks/{cac.DWAW3Uh5.js → cac.Cs06pOqp.js} +56 -7
- package/dist/chunks/{cli-api.BtqJwSCh.js → cli-api.CB-jIbYQ.js} +585 -407
- package/dist/chunks/{config.Cy0C388Z.d.ts → config.CPguQ7J1.d.ts} +2 -1
- package/dist/chunks/{environment.LoooBwUu.d.ts → environment.CT0jpO-1.d.ts} +2 -1
- package/dist/chunks/{globals.D8ZVAdXd.js → globals.BCGEw6ON.js} +2 -2
- package/dist/chunks/{index.nEwtF0bu.js → index.BjjsHdBb.js} +1 -1
- package/dist/chunks/{index.ckWaX2gY.js → index.DD5eTY2y.js} +2 -8
- package/dist/chunks/{index.DsZFoqi9.js → index.bzFpKeaq.js} +601 -807
- package/dist/chunks/{reporters.D7Jzd9GS.d.ts → reporters.F9D2idOT.d.ts} +1429 -1286
- package/dist/chunks/{resolveConfig.RxKrDli4.js → resolveConfig.CLnvCvEs.js} +11 -9
- package/dist/chunks/{runBaseTests.3qpJUEJM.js → runBaseTests.B7hcVT-s.js} +4 -4
- package/dist/chunks/{setup-common.Dj6BZI3u.js → setup-common.BfGt8K-K.js} +4 -1
- package/dist/chunks/{suite.B2jumIFP.d.ts → suite.BJU7kdY9.d.ts} +4 -4
- package/dist/chunks/{utils.DNoFbBUZ.js → utils.DJONn5B5.js} +15 -21
- package/dist/chunks/{vi.DgezovHB.js → vi.BlPttogV.js} +6 -1
- package/dist/chunks/{vite.C-N5BBZe.d.ts → vite.DonA4fvH.d.ts} +1 -1
- package/dist/chunks/{worker.tN5KGIih.d.ts → worker.9VY11NZs.d.ts} +2 -2
- package/dist/chunks/{worker.B9FxPCaC.d.ts → worker.Qz1UB4Fv.d.ts} +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +13 -11
- package/dist/coverage.d.ts +9 -112
- package/dist/coverage.js +2 -2
- package/dist/environments.d.ts +2 -2
- package/dist/execute.d.ts +4 -3
- package/dist/index.d.ts +14 -13
- package/dist/index.js +2 -2
- package/dist/node.d.ts +26 -15
- package/dist/node.js +9 -9
- package/dist/reporters.d.ts +9 -8
- package/dist/reporters.js +4 -5
- package/dist/runners.d.ts +5 -3
- package/dist/runners.js +4 -1
- package/dist/suite.d.ts +2 -2
- package/dist/workers/forks.js +1 -1
- package/dist/workers/runVmTests.js +4 -4
- package/dist/workers/threads.js +1 -1
- package/dist/workers.d.ts +5 -4
- package/dist/workers.js +1 -1
- package/package.json +13 -12
package/dist/node.d.ts
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BaseCoverageOptions,
|
|
1
|
+
import { y as VitestRunMode, K as VitestOptions, V as Vitest, F as UserConfig$1, A as ApiConfig, L as Logger, G as ResolvedConfig$1, M as TestProject, N as TestSequencer, O as WorkspaceSpec, Q as TestModule, X as ModuleDiagnostic } from './chunks/reporters.F9D2idOT.js';
|
|
2
|
+
export { B as BaseCoverageOptions, J as BenchmarkUserOptions, ae as BrowserBuiltinProvider, af as BrowserCommand, ag as BrowserCommandContext, u as BrowserConfigOptions, ah as BrowserOrchestrator, ai as BrowserProvider, aj as BrowserProviderInitializationOptions, ak as BrowserProviderModule, al as BrowserProviderOptions, t as BrowserScript, am as BrowserServer, an as BrowserServerState, ao as BrowserServerStateContext, v as BuiltinEnvironment, ap as CDPSession, x as CSSModuleScopeStrategy, q as CoverageIstanbulOptions, p as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, n as CoverageReporter, d as CoverageV8Options, r as CustomProviderOptions, D as DepsOptimizationOptions, a0 as HTMLOptions, I as InlineConfig, a2 as JUnitOptions, a1 as JsonOptions, P as Pool, w as PoolOptions, Z as ProcessPool, H as ProjectConfig, a as ReportContext, as as ResolveSnapshotPathHandler, at as ResolveSnapshotPathHandlerContext, aq as ResolvedBrowserOptions, R as ResolvedCoverageOptions, ar as ResolvedProjectConfig, $ as SerializedTestProject, a5 as TaskOptions, a3 as TestCase, a6 as TestCollection, a7 as TestDiagnostic, a8 as TestResult, a9 as TestResultFailed, aa as TestResultPassed, ab as TestResultSkipped, ac as TestSequencerConstructor, ad as TestSpecification, a4 as TestSuite, z as TransformModePatterns, j as TypeCheckCollectLineNumbers, k as TypeCheckCollectLines, m as TypeCheckContext, i as TypeCheckErrorInfo, h as TypeCheckRawErrorsMap, l as TypeCheckRootAndTarget, E as TypecheckConfig, U as UserWorkspaceConfig, g as VitestEnvironment, Y as VitestPackageInstaller, _ as getFilePoolName } from './chunks/reporters.F9D2idOT.js';
|
|
3
3
|
import { UserConfig, ResolvedConfig, Plugin, 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 { isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
7
|
-
import { P as ProvidedContext } from './chunks/environment.
|
|
8
|
-
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions, O as OnServerRestartHandler } from './chunks/environment.
|
|
9
|
-
import { R as RuntimeRPC } from './chunks/worker.
|
|
7
|
+
import { P as ProvidedContext, h as OnTestsRerunHandler } from './chunks/environment.CT0jpO-1.js';
|
|
8
|
+
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions, O as OnServerRestartHandler } from './chunks/environment.CT0jpO-1.js';
|
|
9
|
+
import { R as RuntimeRPC } from './chunks/worker.9VY11NZs.js';
|
|
10
10
|
import { Writable } from 'node:stream';
|
|
11
|
-
export { W as WorkerContext } from './chunks/worker.
|
|
11
|
+
export { W as WorkerContext } from './chunks/worker.Qz1UB4Fv.js';
|
|
12
12
|
import createDebug from 'debug';
|
|
13
|
-
export { b as RuntimeConfig } from './chunks/config.
|
|
13
|
+
export { b as RuntimeConfig } from './chunks/config.CPguQ7J1.js';
|
|
14
14
|
export { SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
15
15
|
import '@vitest/utils';
|
|
16
|
+
import 'vite-node';
|
|
17
|
+
import '@vitest/utils/source-map';
|
|
16
18
|
import '@vitest/pretty-format';
|
|
17
19
|
import '@vitest/snapshot';
|
|
18
|
-
import '
|
|
20
|
+
import '@vitest/utils/diff';
|
|
19
21
|
import 'chai';
|
|
20
|
-
import '
|
|
21
|
-
import 'vite-node/client';
|
|
22
|
-
import 'vite-node/server';
|
|
23
|
-
import './chunks/benchmark.geERunq4.js';
|
|
22
|
+
import './chunks/benchmark.CFFwLv-O.js';
|
|
24
23
|
import '@vitest/runner/utils';
|
|
25
24
|
import 'tinybench';
|
|
25
|
+
import 'vite-node/client';
|
|
26
|
+
import 'vite-node/server';
|
|
26
27
|
import '@vitest/snapshot/manager';
|
|
27
28
|
import 'node:fs';
|
|
28
29
|
import 'node:worker_threads';
|
|
@@ -51,7 +52,7 @@ interface CliOptions extends UserConfig$1 {
|
|
|
51
52
|
*
|
|
52
53
|
* Returns a Vitest instance if initialized successfully.
|
|
53
54
|
*/
|
|
54
|
-
declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig, vitestOptions?: VitestOptions): Promise<Vitest
|
|
55
|
+
declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
55
56
|
|
|
56
57
|
interface CLIOptions {
|
|
57
58
|
allowUnknownOptions?: boolean;
|
|
@@ -76,8 +77,18 @@ declare class GitNotFoundError extends Error {
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
interface GlobalSetupContext {
|
|
80
|
+
/**
|
|
81
|
+
* Config of the current project.
|
|
82
|
+
*/
|
|
79
83
|
config: ResolvedConfig$1;
|
|
84
|
+
/**
|
|
85
|
+
* Provide a value to the test context. This value will be available to all tests via `inject`.
|
|
86
|
+
*/
|
|
80
87
|
provide: <T extends keyof ProvidedContext & string>(key: T, value: ProvidedContext[T]) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Register a function that will be called before tests run again in watch mode.
|
|
90
|
+
*/
|
|
91
|
+
onTestsRerun: (cb: OnTestsRerunHandler) => void;
|
|
81
92
|
}
|
|
82
93
|
|
|
83
94
|
declare function VitestPlugin(options?: UserConfig$1, ctx?: Vitest): Promise<Plugin[]>;
|
|
@@ -87,7 +98,7 @@ declare function resolveFsAllow(projectRoot: string, rootConfigFile: string | fa
|
|
|
87
98
|
interface MethodsOptions {
|
|
88
99
|
cacheFs?: boolean;
|
|
89
100
|
}
|
|
90
|
-
declare function createMethodsRPC(project:
|
|
101
|
+
declare function createMethodsRPC(project: TestProject, options?: MethodsOptions): RuntimeRPC;
|
|
91
102
|
|
|
92
103
|
declare class BaseSequencer implements TestSequencer {
|
|
93
104
|
protected ctx: Vitest;
|
|
@@ -119,4 +130,4 @@ declare const TestFile: typeof TestModule;
|
|
|
119
130
|
*/
|
|
120
131
|
type FileDiagnostic = ModuleDiagnostic;
|
|
121
132
|
|
|
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 };
|
|
133
|
+
export { ApiConfig, BaseSequencer, type FileDiagnostic, GitNotFoundError, type GlobalSetupContext, ModuleDiagnostic, OnTestsRerunHandler, ResolvedConfig$1 as ResolvedConfig, TestFile, TestModule, TestProject, TestSequencer, FilesNotFoundError as TestsNotFoundError, UserConfig$1 as UserConfig, Vitest, VitestPlugin, VitestRunMode, TestProject as WorkspaceProject, WorkspaceSpec, createDebugger, createMethodsRPC, createServer, createViteLogger, createViteServer, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest };
|
package/dist/node.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { createServer as createServer$1 } from 'vite';
|
|
2
2
|
export { isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
3
|
-
import { f as TestModule } from './chunks/index.
|
|
4
|
-
export { e as TestCase,
|
|
5
|
-
export { p as parseCLI } from './chunks/cac.
|
|
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.
|
|
7
|
-
export { d as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig, b as resolveConfig } from './chunks/resolveConfig.
|
|
8
|
-
export { B as BaseSequencer } from './chunks/RandomSequencer.
|
|
3
|
+
import { f as TestModule } from './chunks/index.bzFpKeaq.js';
|
|
4
|
+
export { e as TestCase, g as TestSuite } from './chunks/index.bzFpKeaq.js';
|
|
5
|
+
export { p as parseCLI } from './chunks/cac.Cs06pOqp.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.CB-jIbYQ.js';
|
|
7
|
+
export { d as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig, b as resolveConfig } from './chunks/resolveConfig.CLnvCvEs.js';
|
|
8
|
+
export { B as BaseSequencer } from './chunks/RandomSequencer.BPedXEug.js';
|
|
9
9
|
export { distDir, rootDir } from './path.js';
|
|
10
10
|
import createDebug from 'debug';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
import '@vitest/runner/utils';
|
|
13
13
|
import 'pathe';
|
|
14
14
|
import 'tinyrainbow';
|
|
15
|
-
import './chunks/utils.
|
|
15
|
+
import './chunks/utils.DJONn5B5.js';
|
|
16
16
|
import 'node:util';
|
|
17
17
|
import '@vitest/utils';
|
|
18
18
|
import 'node:perf_hooks';
|
|
19
19
|
import '@vitest/utils/source-map';
|
|
20
20
|
import 'std-env';
|
|
21
21
|
import 'node:fs/promises';
|
|
22
|
+
import 'restore-cursor';
|
|
22
23
|
import 'node:stream';
|
|
23
24
|
import 'node:console';
|
|
24
25
|
import 'node:process';
|
|
25
26
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
26
|
-
import 'assert';
|
|
27
|
-
import 'events';
|
|
28
27
|
import 'node:module';
|
|
29
28
|
import 'node:os';
|
|
29
|
+
import 'events';
|
|
30
30
|
import './chunks/constants.fzPh7AOq.js';
|
|
31
31
|
import './chunks/coverage.BoMDb1ip.js';
|
|
32
32
|
import 'node:path';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aE as BaseReporter, au as BasicReporter, aO as BenchmarkBuiltinReporters, aN as BenchmarkReportsMap, aJ as BuiltinReporterOptions, aI as BuiltinReporters, av as DefaultReporter, aw as DotReporter, aG as FileDiagnostic, ax as GithubActionsReporter, ay as HangingProcessReporter, aA as JUnitReporter, aK as JsonAssertionResult, az as JsonReporter, aL as JsonTestResult, aM as JsonTestResults, s as Reporter, aH as ReportersMap, aB as TapFlatReporter, aC as TapReporter, a5 as TaskOptions, a3 as TestCase, a6 as TestCollection, a7 as TestDiagnostic, aF as TestFile, Q as TestModule, M as TestProject, a8 as TestResult, a9 as TestResultFailed, aa as TestResultPassed, ab as TestResultSkipped, a4 as TestSuite, aD as VerboseReporter } from './chunks/reporters.F9D2idOT.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
|
-
import './chunks/environment.
|
|
3
|
+
import './chunks/environment.CT0jpO-1.js';
|
|
4
4
|
import 'node:stream';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import '@vitest/utils';
|
|
7
|
-
import '
|
|
7
|
+
import 'vite-node';
|
|
8
|
+
import '@vitest/utils/source-map';
|
|
9
|
+
import './chunks/config.CPguQ7J1.js';
|
|
8
10
|
import '@vitest/pretty-format';
|
|
9
11
|
import '@vitest/snapshot';
|
|
10
12
|
import '@vitest/snapshot/environment';
|
|
11
|
-
import '
|
|
13
|
+
import '@vitest/utils/diff';
|
|
12
14
|
import 'chai';
|
|
13
|
-
import '
|
|
14
|
-
import 'vite-node/client';
|
|
15
|
-
import 'vite-node/server';
|
|
16
|
-
import './chunks/benchmark.geERunq4.js';
|
|
15
|
+
import './chunks/benchmark.CFFwLv-O.js';
|
|
17
16
|
import '@vitest/runner/utils';
|
|
18
17
|
import 'tinybench';
|
|
18
|
+
import 'vite-node/client';
|
|
19
|
+
import 'vite-node/server';
|
|
19
20
|
import '@vitest/snapshot/manager';
|
|
20
21
|
import 'node:fs';
|
package/dist/reporters.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.
|
|
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.bzFpKeaq.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import '@vitest/runner/utils';
|
|
4
4
|
import 'pathe';
|
|
5
5
|
import 'tinyrainbow';
|
|
6
|
-
import './chunks/utils.
|
|
6
|
+
import './chunks/utils.DJONn5B5.js';
|
|
7
7
|
import 'node:util';
|
|
8
8
|
import '@vitest/utils';
|
|
9
9
|
import 'node:perf_hooks';
|
|
10
10
|
import '@vitest/utils/source-map';
|
|
11
|
-
import './chunks/RandomSequencer.
|
|
11
|
+
import './chunks/RandomSequencer.BPedXEug.js';
|
|
12
12
|
import 'std-env';
|
|
13
13
|
import 'node:fs/promises';
|
|
14
14
|
import 'tinyexec';
|
|
@@ -20,9 +20,8 @@ import 'node:module';
|
|
|
20
20
|
import 'fs';
|
|
21
21
|
import 'vite-node/utils';
|
|
22
22
|
import 'node:crypto';
|
|
23
|
+
import 'restore-cursor';
|
|
23
24
|
import 'node:stream';
|
|
24
25
|
import 'node:console';
|
|
25
26
|
import 'node:process';
|
|
26
27
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
27
|
-
import 'assert';
|
|
28
|
-
import 'events';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as tinybench from 'tinybench';
|
|
2
|
-
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test,
|
|
3
|
-
import { S as SerializedConfig } from './chunks/config.
|
|
2
|
+
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, TaskContext, ExtendedContext } from '@vitest/runner';
|
|
3
|
+
import { S as SerializedConfig } from './chunks/config.CPguQ7J1.js';
|
|
4
4
|
import '@vitest/pretty-format';
|
|
5
5
|
import '@vitest/snapshot';
|
|
6
6
|
import '@vitest/snapshot/environment';
|
|
7
|
+
import '@vitest/utils/diff';
|
|
7
8
|
|
|
8
9
|
declare class NodeBenchmarkRunner implements VitestRunner {
|
|
9
10
|
config: SerializedConfig;
|
|
@@ -31,11 +32,12 @@ declare class VitestTestRunner implements VitestRunner {
|
|
|
31
32
|
onAfterRunSuite(suite: Suite): Promise<void>;
|
|
32
33
|
onAfterRunTask(test: Task): void;
|
|
33
34
|
onCancel(_reason: CancelReason): void;
|
|
35
|
+
injectValue(key: string): any;
|
|
34
36
|
onBeforeRunTask(test: Task): Promise<void>;
|
|
35
37
|
onBeforeRunSuite(suite: Suite): Promise<void>;
|
|
36
38
|
onBeforeTryTask(test: Task): void;
|
|
37
39
|
onAfterTryTask(test: Task): void;
|
|
38
|
-
extendTaskContext<T extends Test
|
|
40
|
+
extendTaskContext<T extends Test>(context: TaskContext<T>): ExtendedContext<T>;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
export { NodeBenchmarkRunner, VitestTestRunner };
|
package/dist/runners.js
CHANGED
|
@@ -4,7 +4,7 @@ import { a as getBenchOptions, g as getBenchFn } from './chunks/benchmark.Cdu9hj
|
|
|
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, 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.BlPttogV.js';
|
|
8
8
|
import { r as rpc } from './chunks/rpc.C3q9uwRX.js';
|
|
9
9
|
import 'chai';
|
|
10
10
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
@@ -202,6 +202,9 @@ class VitestTestRunner {
|
|
|
202
202
|
onCancel(_reason) {
|
|
203
203
|
this.cancelRun = true;
|
|
204
204
|
}
|
|
205
|
+
injectValue(key) {
|
|
206
|
+
return inject(key);
|
|
207
|
+
}
|
|
205
208
|
async onBeforeRunTask(test) {
|
|
206
209
|
if (this.cancelRun) {
|
|
207
210
|
test.mode = "skip";
|
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.BJU7kdY9.js';
|
|
2
2
|
export { 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.CFFwLv-O.js';
|
|
5
5
|
import 'tinybench';
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
2
|
+
import { r as runBaseTests } from '../chunks/base.BS0HhLXd.js';
|
|
3
3
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.Cn0zI1t3.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
5
|
import '../chunks/execute.2pr0rHgK.js';
|
|
@@ -5,11 +5,11 @@ import util from 'node:util';
|
|
|
5
5
|
import { startTests, collectTests } from '@vitest/runner';
|
|
6
6
|
import { KNOWN_ASSET_TYPES } from 'vite-node/constants';
|
|
7
7
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
8
|
-
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.
|
|
8
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.BjjsHdBb.js';
|
|
9
9
|
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/coverage.BoMDb1ip.js';
|
|
10
|
-
import { V as VitestIndex } from '../chunks/index.
|
|
10
|
+
import { V as VitestIndex } from '../chunks/index.DD5eTY2y.js';
|
|
11
11
|
import { c as closeInspector } from '../chunks/inspector.70d6emsh.js';
|
|
12
|
-
import { s as setupCommonEnv } from '../chunks/setup-common.
|
|
12
|
+
import { s as setupCommonEnv } from '../chunks/setup-common.BfGt8K-K.js';
|
|
13
13
|
import { g as getWorkerState } from '../chunks/utils.C8RiOc4B.js';
|
|
14
14
|
import 'chai';
|
|
15
15
|
import 'node:path';
|
|
@@ -18,7 +18,7 @@ import 'node:url';
|
|
|
18
18
|
import '../chunks/rpc.C3q9uwRX.js';
|
|
19
19
|
import '@vitest/utils';
|
|
20
20
|
import '../chunks/index.68735LiX.js';
|
|
21
|
-
import '../chunks/vi.
|
|
21
|
+
import '../chunks/vi.BlPttogV.js';
|
|
22
22
|
import '@vitest/expect';
|
|
23
23
|
import '@vitest/runner/utils';
|
|
24
24
|
import '../chunks/_commonjsHelpers.BFTU3MAI.js';
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
1
|
+
import { r as runBaseTests } from '../chunks/base.BS0HhLXd.js';
|
|
2
2
|
import { a as createThreadsRpcOptions } from '../chunks/utils.Cn0zI1t3.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
4
|
import '../chunks/execute.2pr0rHgK.js';
|
package/dist/workers.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
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.9VY11NZs.js';
|
|
2
2
|
import { Awaitable } from '@vitest/utils';
|
|
3
3
|
import * as v8 from 'v8';
|
|
4
|
-
import { S as SerializedConfig } from './chunks/config.
|
|
5
|
-
import { W as WorkerContext } from './chunks/worker.
|
|
4
|
+
import { S as SerializedConfig } from './chunks/config.CPguQ7J1.js';
|
|
5
|
+
import { W as WorkerContext } from './chunks/worker.Qz1UB4Fv.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import 'vite-node';
|
|
8
|
-
import './chunks/environment.
|
|
8
|
+
import './chunks/environment.CT0jpO-1.js';
|
|
9
9
|
import '@vitest/snapshot';
|
|
10
10
|
import '@vitest/pretty-format';
|
|
11
11
|
import '@vitest/snapshot/environment';
|
|
12
|
+
import '@vitest/utils/diff';
|
|
12
13
|
import 'node:worker_threads';
|
|
13
14
|
|
|
14
15
|
declare function provideWorkerState(context: any, state: WorkerGlobalState): WorkerGlobalState;
|
package/dist/workers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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.BS0HhLXd.js';
|
|
4
4
|
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.Cn0zI1t3.js';
|
|
5
5
|
export { r as runVmTests } from './chunks/vm.Zr4qWzDJ.js';
|
|
6
6
|
import '@vitest/utils';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0-beta.2",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
"@types/node": "^18.0.0 || >=20.0.0",
|
|
123
123
|
"happy-dom": "*",
|
|
124
124
|
"jsdom": "*",
|
|
125
|
-
"@vitest/browser": "2.
|
|
126
|
-
"@vitest/ui": "2.
|
|
125
|
+
"@vitest/browser": "2.2.0-beta.2",
|
|
126
|
+
"@vitest/ui": "2.2.0-beta.2"
|
|
127
127
|
},
|
|
128
128
|
"peerDependenciesMeta": {
|
|
129
129
|
"@edge-runtime/vm": {
|
|
@@ -151,21 +151,22 @@
|
|
|
151
151
|
"expect-type": "^1.1.0",
|
|
152
152
|
"magic-string": "^0.30.12",
|
|
153
153
|
"pathe": "^1.1.2",
|
|
154
|
+
"restore-cursor": "^5.1.0",
|
|
154
155
|
"std-env": "^3.8.0",
|
|
155
156
|
"tinybench": "^2.9.0",
|
|
156
157
|
"tinyexec": "^0.3.1",
|
|
157
|
-
"tinypool": "^1.0.
|
|
158
|
+
"tinypool": "^1.0.2",
|
|
158
159
|
"tinyrainbow": "^1.2.0",
|
|
159
160
|
"vite": "^5.0.0",
|
|
160
161
|
"why-is-node-running": "^2.3.0",
|
|
161
|
-
"@vitest/
|
|
162
|
-
"@vitest/
|
|
163
|
-
"@vitest/
|
|
164
|
-
"@vitest/
|
|
165
|
-
"@vitest/
|
|
166
|
-
"
|
|
167
|
-
"@vitest/spy": "2.
|
|
168
|
-
"
|
|
162
|
+
"@vitest/mocker": "2.2.0-beta.2",
|
|
163
|
+
"@vitest/pretty-format": "^2.2.0-beta.2",
|
|
164
|
+
"@vitest/expect": "2.2.0-beta.2",
|
|
165
|
+
"@vitest/runner": "2.2.0-beta.2",
|
|
166
|
+
"@vitest/snapshot": "2.2.0-beta.2",
|
|
167
|
+
"@vitest/utils": "2.2.0-beta.2",
|
|
168
|
+
"@vitest/spy": "2.2.0-beta.2",
|
|
169
|
+
"vite-node": "2.2.0-beta.2"
|
|
169
170
|
},
|
|
170
171
|
"devDependencies": {
|
|
171
172
|
"@ampproject/remapping": "^2.3.0",
|