vitest 3.1.3 → 3.2.0-beta.1
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 +2 -2
- package/dist/browser.js +1 -1
- package/dist/chunks/{base.DslwPSCy.js → base.SfTiRNZf.js} +1 -1
- package/dist/chunks/{cac.BN2e7cE1.js → cac.TfX2-DVH.js} +9 -7
- package/dist/chunks/{cli-api.Bti1vevt.js → cli-api.2970Nj9J.js} +908 -847
- package/dist/chunks/{coverage.87S59-Sl.js → coverage.z0LVMxgb.js} +3 -1
- package/dist/chunks/{environment.d.Dmw5ulng.d.ts → environment.d.D8YDy2v5.d.ts} +2 -1
- package/dist/chunks/{global.d.CXRAxnWc.d.ts → global.d.BCOHQEpR.d.ts} +7 -2
- package/dist/chunks/{globals.CZAEe_Gf.js → globals.Cg4NtV4P.js} +2 -2
- package/dist/chunks/{index.B0uVAVvx.js → index.BPc7M5ni.js} +1 -1
- package/dist/chunks/{index.De2FqGmR.js → index.CUacZlWG.js} +14 -8
- package/dist/chunks/{index.Cu2UlluP.js → index.DbWBPwtH.js} +2 -2
- package/dist/chunks/{reporters.d.DG9VKi4m.d.ts → reporters.d.DGm4k1Wx.d.ts} +51 -11
- package/dist/chunks/{runBaseTests.BV8m0B-u.js → runBaseTests.CguliJB5.js} +5 -5
- package/dist/chunks/{setup-common.AQcDs321.js → setup-common.BP6KrF_Z.js} +1 -1
- package/dist/chunks/{utils.Cc45eY3L.js → utils.8gfOgtry.js} +19 -12
- package/dist/chunks/{vi.ClIskdbk.js → vi.BFR5YIgu.js} +3 -0
- package/dist/chunks/{vite.d.D3ndlJcw.d.ts → vite.d.DjP_ALCZ.d.ts} +1 -1
- package/dist/chunks/{worker.d.CHGSOG0s.d.ts → worker.d.CoCI7hzP.d.ts} +1 -1
- package/dist/chunks/{worker.d.C-KN07Ls.d.ts → worker.d.D5Xdi-Zr.d.ts} +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.cjs +3 -0
- package/dist/config.d.ts +8 -5
- package/dist/config.js +3 -0
- package/dist/coverage.d.ts +3 -3
- package/dist/coverage.js +1 -1
- package/dist/environments.d.ts +2 -2
- package/dist/execute.d.ts +2 -2
- package/dist/index.d.ts +45 -10
- package/dist/index.js +2 -2
- package/dist/node.d.ts +8 -8
- package/dist/node.js +7 -7
- package/dist/reporters.d.ts +3 -3
- package/dist/reporters.js +2 -2
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +2 -2
- package/dist/workers/forks.js +1 -1
- package/dist/workers/runVmTests.js +5 -5
- package/dist/workers/threads.js +1 -1
- package/dist/workers.d.ts +3 -3
- package/dist/workers.js +1 -1
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { File as File$1, TaskResultPack as TaskResultPack$1, TaskEventPack, TaskPopulated, Suite as Suite$1, Test as Test$1, Custom as Custom$1, Task as Task$1, TaskBase as TaskBase$1, TaskResult as TaskResult$1, DoneCallback as DoneCallback$1, RuntimeContext as RuntimeContext$1, SuiteHooks as SuiteHooks$1, SequenceHooks as SequenceHooks$1, SequenceSetupFiles as SequenceSetupFiles$1 } from '@vitest/runner';
|
|
2
2
|
export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskEventPack as RunnerTaskEventPack, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
import { S as SerializedTestSpecification,
|
|
4
|
-
export {
|
|
5
|
-
import { W as WorkerContext$1 } from './chunks/worker.d.
|
|
6
|
-
import { R as RawErrsMap$1, T as TscErrorInfo$1, C as CollectLineNumbers$1, a as CollectLines$1, b as RootAndTarget$1, c as Context$1 } from './chunks/global.d.
|
|
7
|
-
import { b as Awaitable$1, U as UserConsoleLog, M as ModuleGraphData, P as ProvidedContext, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, a as EnvironmentReturn$1, V as VmEnvironmentReturn$1, E as Environment$1, R as ResolvedTestEnvironment$1, J as JSDOMOptions$1, H as HappyDOMOptions$1, f as EnvironmentOptions$1 } from './chunks/environment.d.
|
|
8
|
-
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d.
|
|
9
|
-
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.
|
|
10
|
-
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.
|
|
11
|
-
import './chunks/vite.d.
|
|
3
|
+
import { S as SerializedTestSpecification, h as CoverageProvider$1, a as ReportContext$1, i as CoverageProviderModule$1, j as CoverageReporter$1, k as CoverageProviderName, l as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, m as CoverageIstanbulOptions$1, c as CoverageV8Options$1, n as CustomProviderOptions$1, o as Reporter$1, V as Vitest$1, p as BrowserScript$1, q as BrowserConfigOptions$1, r as BuiltinEnvironment$1, s as VitestEnvironment$1, P as Pool$1, t as PoolOptions$1, u as CSSModuleScopeStrategy$1, A as ApiConfig$1, v as VitestRunMode$1, D as DepsOptimizationOptions$1, w as TransformModePatterns$1, I as InlineConfig$1, x as TypecheckConfig$1, y as UserConfig$1, z as ResolvedConfig$1, E as ProjectConfig$1, U as UserWorkspaceConfig$1, F as BenchmarkUserOptions$1 } from './chunks/reporters.d.DGm4k1Wx.js';
|
|
4
|
+
export { G as BrowserTesterOptions } from './chunks/reporters.d.DGm4k1Wx.js';
|
|
5
|
+
import { W as WorkerContext$1 } from './chunks/worker.d.D5Xdi-Zr.js';
|
|
6
|
+
import { R as RawErrsMap$1, T as TscErrorInfo$1, C as CollectLineNumbers$1, a as CollectLines$1, b as RootAndTarget$1, c as Context$1 } from './chunks/global.d.BCOHQEpR.js';
|
|
7
|
+
import { b as Awaitable$1, U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, P as ProvidedContext, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, a as EnvironmentReturn$1, V as VmEnvironmentReturn$1, E as Environment$1, R as ResolvedTestEnvironment$1, J as JSDOMOptions$1, H as HappyDOMOptions$1, f as EnvironmentOptions$1 } from './chunks/environment.d.D8YDy2v5.js';
|
|
8
|
+
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d.D8YDy2v5.js';
|
|
9
|
+
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.CoCI7hzP.js';
|
|
10
|
+
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.CoCI7hzP.js';
|
|
11
|
+
import './chunks/vite.d.DjP_ALCZ.js';
|
|
12
12
|
import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.UqE-KR0o.js';
|
|
13
13
|
export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.UqE-KR0o.js';
|
|
14
14
|
import { ExpectStatic } from '@vitest/expect';
|
|
@@ -68,7 +68,12 @@ interface WebSocketHandlers {
|
|
|
68
68
|
getTestFiles: () => Promise<SerializedTestSpecification[]>;
|
|
69
69
|
getPaths: () => string[];
|
|
70
70
|
getConfig: () => SerializedConfig;
|
|
71
|
+
/** @deprecated -- Use `getResolvedProjectLabels` instead */
|
|
71
72
|
getResolvedProjectNames: () => string[];
|
|
73
|
+
getResolvedProjectLabels: () => {
|
|
74
|
+
name: string
|
|
75
|
+
color?: LabelColor
|
|
76
|
+
}[];
|
|
72
77
|
getModuleGraph: (projectName: string, id: string, browser?: boolean) => Promise<ModuleGraphData>;
|
|
73
78
|
getTransformResult: (projectName: string, id: string, browser?: boolean) => Promise<TransformResultWithSource | undefined>;
|
|
74
79
|
readTestFile: (id: string) => Promise<string | null>;
|
|
@@ -370,6 +375,36 @@ interface VitestUtils {
|
|
|
370
375
|
*/
|
|
371
376
|
importMock: <T = ESModuleExports>(path: string) => Promise<MaybeMockedDeep<T>>;
|
|
372
377
|
/**
|
|
378
|
+
* Deeply mocks properties and methods of a given object
|
|
379
|
+
* in the same way as `vi.mock()` mocks module exports.
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* ```ts
|
|
383
|
+
* const original = {
|
|
384
|
+
* simple: () => 'value',
|
|
385
|
+
* nested: {
|
|
386
|
+
* method: () => 'real'
|
|
387
|
+
* },
|
|
388
|
+
* prop: 'foo',
|
|
389
|
+
* }
|
|
390
|
+
*
|
|
391
|
+
* const mocked = vi.mockObject(original)
|
|
392
|
+
* expect(mocked.simple()).toBe(undefined)
|
|
393
|
+
* expect(mocked.nested.method()).toBe(undefined)
|
|
394
|
+
* expect(mocked.prop).toBe('foo')
|
|
395
|
+
*
|
|
396
|
+
* mocked.simple.mockReturnValue('mocked')
|
|
397
|
+
* mocked.nested.method.mockReturnValue('mocked nested')
|
|
398
|
+
*
|
|
399
|
+
* expect(mocked.simple()).toBe('mocked')
|
|
400
|
+
* expect(mocked.nested.method()).toBe('mocked nested')
|
|
401
|
+
* ```
|
|
402
|
+
*
|
|
403
|
+
* @param value - The object to be mocked
|
|
404
|
+
* @returns A deeply mocked version of the input object
|
|
405
|
+
*/
|
|
406
|
+
mockObject: <T>(value: T) => MaybeMockedDeep<T>;
|
|
407
|
+
/**
|
|
373
408
|
* Type helper for TypeScript. Just returns the object that was passed.
|
|
374
409
|
*
|
|
375
410
|
* When `partial` is `true` it will expect a `Partial<T>` as a return value. By default, this will only make TypeScript believe that
|
|
@@ -621,5 +656,5 @@ type SerializableSpec = SerializedTestSpecification;
|
|
|
621
656
|
/** @deprecated import from `vitest/node` instead */
|
|
622
657
|
type BenchmarkUserOptions = BenchmarkUserOptions$1;
|
|
623
658
|
|
|
624
|
-
export { ModuleGraphData, ProvidedContext, SerializedConfig, SerializedTestSpecification, UserConsoleLog, assertType, createExpect, globalExpect as expect, getRunningMode, inject, isFirstRun, isWatchMode, runOnce, vi, vitest };
|
|
659
|
+
export { LabelColor, ModuleGraphData, ProvidedContext, SerializedConfig, SerializedTestSpecification, UserConsoleLog, assertType, createExpect, globalExpect as expect, getRunningMode, inject, isFirstRun, isWatchMode, runOnce, vi, vitest };
|
|
625
660
|
export type { ApiConfig, ArgumentsType, Arrayable, AssertType, Awaitable, BaseCoverageOptions, BenchmarkUserOptions, BrowserConfigOptions, BrowserScript, BrowserUI, BuiltinEnvironment, CSSModuleScopeStrategy, CollectLineNumbers, CollectLines, Constructable, Context, CoverageIstanbulOptions, CoverageOptions, CoverageProvider, CoverageProviderModule, CoverageReporter, CoverageV8Options, Custom, CustomProviderOptions, DepsOptimizationOptions, DoneCallback, Environment, EnvironmentOptions, EnvironmentReturn, File, HappyDOMOptions, InlineConfig, JSDOMOptions, MutableArray, Nullable, Pool, PoolOptions, ProjectConfig, RawErrsMap, ReportContext, Reporter, ResolvedConfig, ResolvedCoverageOptions, ResolvedTestEnvironment, RootAndTarget, RuntimeContext, SequenceHooks, SequenceSetupFiles, SerializableSpec, Suite, SuiteHooks, Task, TaskBase, TaskResult, TaskResultPack, Test, TransformModePatterns, TransformResultWithSource, TscErrorInfo, TypecheckConfig, UserConfig, UserWorkspaceConfig, Vitest, VitestEnvironment, VitestRunMode, VitestUtils, VmEnvironmentReturn, WebSocketEvents, WebSocketHandlers, WebSocketRPC, WorkerContext, WorkerRPC };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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.BFR5YIgu.js';
|
|
2
2
|
export { i as isFirstRun, a as runOnce } from './chunks/run-once.Dimr7O9f.js';
|
|
3
|
-
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.
|
|
3
|
+
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.BPc7M5ni.js';
|
|
4
4
|
export { b as bench } from './chunks/benchmark.BoF7jW0Q.js';
|
|
5
5
|
export { expectTypeOf } from 'expect-type';
|
|
6
6
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BaseCoverageOptions,
|
|
1
|
+
import { z as ResolvedConfig, y as UserConfig, v as VitestRunMode, H as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, J as TestSequencer, K as TestSpecification, L as Logger, M as TestModule, N as ModuleDiagnostic } from './chunks/reporters.d.DGm4k1Wx.js';
|
|
2
|
+
export { B as BaseCoverageOptions, F as BenchmarkUserOptions, ag as BrowserBuiltinProvider, ah as BrowserCommand, ai as BrowserCommandContext, q as BrowserConfigOptions, aj as BrowserInstanceOption, ak as BrowserModuleMocker, al as BrowserOrchestrator, am as BrowserProvider, an as BrowserProviderInitializationOptions, ao as BrowserProviderModule, ap as BrowserProviderOptions, p as BrowserScript, aq as BrowserServerState, ar as BrowserServerStateSession, r as BuiltinEnvironment, as as CDPSession, u as CSSModuleScopeStrategy, m as CoverageIstanbulOptions, l as CoverageOptions, h as CoverageProvider, i as CoverageProviderModule, j as CoverageReporter, c as CoverageV8Options, n as CustomProviderOptions, D as DepsOptimizationOptions, a0 as HTMLOptions, I as InlineConfig, a2 as JUnitOptions, a1 as JsonOptions, O as OnServerRestartHandler, Q as OnTestsRerunHandler, at as ParentProjectBrowser, P as Pool, t as PoolOptions, Y as ProcessPool, au as ProjectBrowser, E as ProjectConfig, a as ReportContext, aA as ReportedHookContext, o as Reporter, ax as ResolveSnapshotPathHandler, ay as ResolveSnapshotPathHandlerContext, av as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aw as ResolvedProjectConfig, $ as SerializedTestProject, a3 as TaskOptions, a4 as TestCase, a5 as TestCollection, a6 as TestDiagnostic, a7 as TestModuleState, a8 as TestResult, a9 as TestResultFailed, aa as TestResultPassed, ab as TestResultSkipped, aB as TestRunEndReason, az as TestRunResult, af as TestSequencerConstructor, ac as TestState, ad as TestSuite, ae as TestSuiteState, w as TransformModePatterns, x as TypecheckConfig, U as UserWorkspaceConfig, s as VitestEnvironment, X as VitestPackageInstaller, g as WatcherTriggerPattern, Z as WorkspaceSpec, _ as getFilePoolName } from './chunks/reporters.d.DGm4k1Wx.js';
|
|
3
3
|
import { InlineConfig, 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.d.
|
|
9
|
-
export { T as TestExecutionType } from './chunks/worker.d.
|
|
8
|
+
import { R as RuntimeRPC } from './chunks/worker.d.CoCI7hzP.js';
|
|
9
|
+
export { T as TestExecutionType } from './chunks/worker.d.CoCI7hzP.js';
|
|
10
10
|
import { Writable } from 'node:stream';
|
|
11
|
-
export { V as VitestPluginContext } from './chunks/vite.d.
|
|
12
|
-
export { W as WorkerContext } from './chunks/worker.d.
|
|
13
|
-
export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.d.
|
|
11
|
+
export { V as VitestPluginContext } from './chunks/vite.d.DjP_ALCZ.js';
|
|
12
|
+
export { W as WorkerContext } from './chunks/worker.d.D5Xdi-Zr.js';
|
|
13
|
+
export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.d.BCOHQEpR.js';
|
|
14
14
|
import { Debugger } from 'debug';
|
|
15
15
|
export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
16
|
-
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.d.
|
|
16
|
+
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.d.D8YDy2v5.js';
|
|
17
17
|
export { SerializedError } from '@vitest/utils';
|
|
18
18
|
export { b as RuntimeConfig } from './chunks/config.d.UqE-KR0o.js';
|
|
19
19
|
export { generateFileHash } from '@vitest/runner/utils';
|
package/dist/node.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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 { r as resolveConfig$2 } from './chunks/coverage.
|
|
7
|
-
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.
|
|
3
|
+
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.2970Nj9J.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.2970Nj9J.js';
|
|
5
|
+
export { p as parseCLI } from './chunks/cac.TfX2-DVH.js';
|
|
6
|
+
import { r as resolveConfig$2 } from './chunks/coverage.z0LVMxgb.js';
|
|
7
|
+
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.z0LVMxgb.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';
|
|
@@ -19,9 +19,9 @@ import '@vitest/snapshot/manager';
|
|
|
19
19
|
import 'vite-node/client';
|
|
20
20
|
import 'vite-node/server';
|
|
21
21
|
import './chunks/index.CJ0plNrh.js';
|
|
22
|
-
import './chunks/index.
|
|
22
|
+
import './chunks/index.CUacZlWG.js';
|
|
23
23
|
import 'tinyrainbow';
|
|
24
|
-
import './chunks/utils.
|
|
24
|
+
import './chunks/utils.8gfOgtry.js';
|
|
25
25
|
import 'node:util';
|
|
26
26
|
import 'node:perf_hooks';
|
|
27
27
|
import '@vitest/utils/source-map';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aQ as BaseReporter, aC as BasicReporter, aR as BenchmarkBuiltinReporters, aD as BenchmarkReporter, aE as BenchmarkReportsMap, aS as BuiltinReporterOptions, aT as BuiltinReporters, aF as DefaultReporter, aG as DotReporter, aH as GithubActionsReporter, aI as HangingProcessReporter, aK as JUnitReporter, aU as JsonAssertionResult, aJ as JsonReporter, aV as JsonTestResult, aW as JsonTestResults, aA as ReportedHookContext, o as Reporter, aL as ReportersMap, aM as TapFlatReporter, aN as TapReporter, aB as TestRunEndReason, aO as VerboseBenchmarkReporter, aP as VerboseReporter } from './chunks/reporters.d.DGm4k1Wx.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
|
-
import './chunks/environment.d.
|
|
3
|
+
import './chunks/environment.d.D8YDy2v5.js';
|
|
4
4
|
import 'vitest/optional-types.js';
|
|
5
5
|
import '@vitest/utils';
|
|
6
6
|
import 'node:stream';
|
|
@@ -8,7 +8,7 @@ import 'vite';
|
|
|
8
8
|
import 'node:console';
|
|
9
9
|
import '@vitest/mocker';
|
|
10
10
|
import '@vitest/utils/source-map';
|
|
11
|
-
import './chunks/worker.d.
|
|
11
|
+
import './chunks/worker.d.CoCI7hzP.js';
|
|
12
12
|
import 'vite-node';
|
|
13
13
|
import './chunks/config.d.UqE-KR0o.js';
|
|
14
14
|
import '@vitest/pretty-format';
|
package/dist/reporters.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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.CUacZlWG.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.8gfOgtry.js';
|
|
7
7
|
import 'node:util';
|
|
8
8
|
import '@vitest/utils';
|
|
9
9
|
import 'node:perf_hooks';
|
package/dist/runners.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare class VitestTestRunner implements VitestRunner {
|
|
|
31
31
|
onAfterRunFiles(): void;
|
|
32
32
|
onAfterRunSuite(suite: Suite): Promise<void>;
|
|
33
33
|
onAfterRunTask(test: Task): void;
|
|
34
|
-
|
|
34
|
+
cancel(_reason: CancelReason): void;
|
|
35
35
|
injectValue(key: string): any;
|
|
36
36
|
onBeforeRunTask(test: Task): Promise<void>;
|
|
37
37
|
onBeforeRunSuite(suite: Suite): Promise<void>;
|
package/dist/runners.js
CHANGED
|
@@ -4,7 +4,7 @@ import { a as getBenchOptions, g as getBenchFn } from './chunks/benchmark.BoF7jW
|
|
|
4
4
|
import { g as getWorkerState } from './chunks/utils.CgTj3MsC.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.BFR5YIgu.js';
|
|
8
8
|
import { r as rpc } from './chunks/rpc.D9_013TY.js';
|
|
9
9
|
import 'chai';
|
|
10
10
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
@@ -170,7 +170,7 @@ class VitestTestRunner {
|
|
|
170
170
|
}
|
|
171
171
|
this.workerState.current = test.suite || test.file;
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
cancel(_reason) {
|
|
174
174
|
this.cancelRun = true;
|
|
175
175
|
}
|
|
176
176
|
injectValue(key) {
|
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.SfTiRNZf.js';
|
|
3
3
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.BfxieIyZ.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
5
|
import '../chunks/execute.BpmIjFTD.js';
|
|
@@ -6,9 +6,9 @@ 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 { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.
|
|
11
|
-
import { V as VitestIndex } from '../chunks/index.
|
|
9
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.DbWBPwtH.js';
|
|
10
|
+
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.BP6KrF_Z.js';
|
|
11
|
+
import { V as VitestIndex } from '../chunks/index.BPc7M5ni.js';
|
|
12
12
|
import { c as closeInspector } from '../chunks/inspector.DbDkSkFn.js';
|
|
13
13
|
import { g as getWorkerState } from '../chunks/utils.CgTj3MsC.js';
|
|
14
14
|
import 'chai';
|
|
@@ -21,7 +21,7 @@ import '../chunks/index.CJ0plNrh.js';
|
|
|
21
21
|
import '../chunks/coverage.0iPg4Wrz.js';
|
|
22
22
|
import '@vitest/snapshot';
|
|
23
23
|
import '../chunks/run-once.Dimr7O9f.js';
|
|
24
|
-
import '../chunks/vi.
|
|
24
|
+
import '../chunks/vi.BFR5YIgu.js';
|
|
25
25
|
import '@vitest/expect';
|
|
26
26
|
import '@vitest/runner/utils';
|
|
27
27
|
import '../chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
@@ -66,7 +66,7 @@ async function run(method, files, config, executor) {
|
|
|
66
66
|
config.snapshotOptions.snapshotEnvironment = snapshotEnvironment;
|
|
67
67
|
workerState.onCancel.then((reason) => {
|
|
68
68
|
closeInspector(config);
|
|
69
|
-
runner.
|
|
69
|
+
runner.cancel?.(reason);
|
|
70
70
|
});
|
|
71
71
|
workerState.durations.prepare = performance.now() - workerState.durations.prepare;
|
|
72
72
|
const { vi } = VitestIndex;
|
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.SfTiRNZf.js';
|
|
2
2
|
import { a as createThreadsRpcOptions } from '../chunks/utils.BfxieIyZ.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
4
|
import '../chunks/execute.BpmIjFTD.js';
|
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.d.
|
|
1
|
+
import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.CoCI7hzP.js';
|
|
2
2
|
import { Awaitable } from '@vitest/utils';
|
|
3
3
|
import * as v8 from 'v8';
|
|
4
4
|
import { a as SerializedConfig } from './chunks/config.d.UqE-KR0o.js';
|
|
5
|
-
import { W as WorkerContext } from './chunks/worker.d.
|
|
5
|
+
import { W as WorkerContext } from './chunks/worker.d.D5Xdi-Zr.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import 'vite-node';
|
|
8
|
-
import './chunks/environment.d.
|
|
8
|
+
import './chunks/environment.d.D8YDy2v5.js';
|
|
9
9
|
import 'vitest/optional-types.js';
|
|
10
10
|
import '@vitest/snapshot';
|
|
11
11
|
import '@vitest/pretty-format';
|
package/dist/workers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { p as provideWorkerState } from './chunks/utils.CgTj3MsC.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.SfTiRNZf.js';
|
|
4
4
|
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.BfxieIyZ.js';
|
|
5
5
|
export { r as runVmTests } from './chunks/vm.CuLHT1BG.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": "3.1
|
|
4
|
+
"version": "3.2.0-beta.1",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
|
|
124
124
|
"happy-dom": "*",
|
|
125
125
|
"jsdom": "*",
|
|
126
|
-
"@vitest/browser": "3.1
|
|
127
|
-
"@vitest/ui": "3.1
|
|
126
|
+
"@vitest/browser": "3.2.0-beta.1",
|
|
127
|
+
"@vitest/ui": "3.2.0-beta.1"
|
|
128
128
|
},
|
|
129
129
|
"peerDependenciesMeta": {
|
|
130
130
|
"@edge-runtime/vm": {
|
|
@@ -163,14 +163,14 @@
|
|
|
163
163
|
"tinyrainbow": "^2.0.0",
|
|
164
164
|
"vite": "^5.0.0 || ^6.0.0",
|
|
165
165
|
"why-is-node-running": "^2.3.0",
|
|
166
|
-
"@vitest/
|
|
167
|
-
"@vitest/pretty-format": "^3.1
|
|
168
|
-
"@vitest/
|
|
169
|
-
"@vitest/
|
|
170
|
-
"@vitest/spy": "3.1
|
|
171
|
-
"@vitest/
|
|
172
|
-
"vite-node": "3.1
|
|
173
|
-
"@vitest/
|
|
166
|
+
"@vitest/mocker": "3.2.0-beta.1",
|
|
167
|
+
"@vitest/pretty-format": "^3.2.0-beta.1",
|
|
168
|
+
"@vitest/runner": "3.2.0-beta.1",
|
|
169
|
+
"@vitest/expect": "3.2.0-beta.1",
|
|
170
|
+
"@vitest/spy": "3.2.0-beta.1",
|
|
171
|
+
"@vitest/utils": "3.2.0-beta.1",
|
|
172
|
+
"vite-node": "3.2.0-beta.1",
|
|
173
|
+
"@vitest/snapshot": "3.2.0-beta.1"
|
|
174
174
|
},
|
|
175
175
|
"devDependencies": {
|
|
176
176
|
"@ampproject/remapping": "^2.3.0",
|