vitest 4.0.0-beta.15 → 4.0.0-beta.17
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/browser/context.d.ts +1 -0
- package/dist/browser.d.ts +16 -3
- package/dist/chunks/{browser.d.CM1rjKAX.d.ts → browser.d.CCG7W26I.d.ts} +1 -1
- package/dist/chunks/{cac.C4q82cVp.js → cac.BO_6jvrs.js} +3 -3
- package/dist/chunks/{cli-api.B1q8b4Kf.js → cli-api.BvCJGado.js} +1 -1
- package/dist/chunks/{config.d.DGazh2r6.d.ts → config.d.C4PpNy7v.d.ts} +1 -1
- package/dist/chunks/{global.d.YxmikCHu.d.ts → global.d.D1pbKXir.d.ts} +1 -1
- package/dist/chunks/{moduleRunner.d.CTZUg34g.d.ts → moduleRunner.d.aXWuQhZN.d.ts} +1 -1
- package/dist/chunks/{plugin.d.DvkMsuLk.d.ts → plugin.d.CqKwuCSa.d.ts} +1 -1
- package/dist/chunks/{reporters.d.DhY37FSs.d.ts → reporters.d.DAyr7w3M.d.ts} +3 -3
- package/dist/chunks/{worker.d.B8jq7m7O.d.ts → worker.d.DSgBAZPX.d.ts} +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +7 -6
- package/dist/coverage.d.ts +4 -4
- package/dist/index.d.ts +7 -7
- package/dist/module-evaluator.d.ts +3 -3
- package/dist/node.d.ts +8 -8
- package/dist/node.js +3 -3
- package/dist/reporters.d.ts +4 -4
- package/dist/runners.d.ts +1 -1
- package/package.json +15 -16
package/browser/context.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export * from '@vitest/browser-playwright/context'
|
|
|
4
4
|
export * from '@vitest/browser-webdriverio/context'
|
|
5
5
|
// @ts-ignore -- @vitest/browser-preview might not be installed
|
|
6
6
|
export * from '@vitest/browser-preview/context'
|
|
7
|
+
export { BrowserCommands, FsOptions } from 'vitest/internal/browser'
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.d.C4PpNy7v.js';
|
|
2
2
|
import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.BZtK59WP.js';
|
|
3
3
|
import { SerializedDiffOptions } from '@vitest/utils/diff';
|
|
4
|
-
import { V as VitestModuleRunner } from './chunks/moduleRunner.d.
|
|
4
|
+
import { V as VitestModuleRunner } from './chunks/moduleRunner.d.aXWuQhZN.js';
|
|
5
5
|
export { collectTests, startTests } from '@vitest/runner';
|
|
6
6
|
import * as _vitest_spy from '@vitest/spy';
|
|
7
7
|
export { _vitest_spy as SpyModule };
|
|
@@ -15,7 +15,7 @@ import '@vitest/pretty-format';
|
|
|
15
15
|
import '@vitest/snapshot';
|
|
16
16
|
import 'node:vm';
|
|
17
17
|
import 'vite/module-runner';
|
|
18
|
-
import './chunks/worker.d.
|
|
18
|
+
import './chunks/worker.d.DSgBAZPX.js';
|
|
19
19
|
import './chunks/environment.d.CrsxCzP1.js';
|
|
20
20
|
import '@vitest/mocker';
|
|
21
21
|
import './chunks/mocker.d.BE_2ls6u.js';
|
|
@@ -32,4 +32,17 @@ declare function setupCommonEnv(config: SerializedConfig): Promise<void>;
|
|
|
32
32
|
declare function loadDiffConfig(config: SerializedConfig, moduleRunner: VitestModuleRunner): Promise<SerializedDiffOptions | undefined>;
|
|
33
33
|
declare function loadSnapshotSerializers(config: SerializedConfig, moduleRunner: VitestModuleRunner): Promise<void>;
|
|
34
34
|
|
|
35
|
+
interface FsOptions {
|
|
36
|
+
encoding?: BufferEncoding;
|
|
37
|
+
flag?: string | number;
|
|
38
|
+
}
|
|
39
|
+
interface BrowserCommands {
|
|
40
|
+
readFile: (path: string, options?: BufferEncoding | FsOptions) => Promise<string>;
|
|
41
|
+
writeFile: (path: string, content: string, options?: BufferEncoding | (FsOptions & {
|
|
42
|
+
mode?: number | string;
|
|
43
|
+
})) => Promise<void>;
|
|
44
|
+
removeFile: (path: string) => Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
|
|
35
47
|
export { loadDiffConfig, loadSnapshotSerializers, setupCommonEnv, startCoverageInsideWorker, stopCoverageInsideWorker, takeCoverageInsideWorker };
|
|
48
|
+
export type { BrowserCommands, FsOptions };
|
|
@@ -619,7 +619,7 @@ class CAC extends EventEmitter {
|
|
|
619
619
|
|
|
620
620
|
const cac = (name = "") => new CAC(name);
|
|
621
621
|
|
|
622
|
-
var version = "4.0.0-beta.
|
|
622
|
+
var version = "4.0.0-beta.17";
|
|
623
623
|
|
|
624
624
|
const apiConfig = (port) => ({
|
|
625
625
|
port: {
|
|
@@ -1341,7 +1341,7 @@ function normalizeCliOptions(cliFilters, argv) {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
async function start(mode, cliFilters, options) {
|
|
1343
1343
|
try {
|
|
1344
|
-
const { startVitest } = await import('./cli-api.
|
|
1344
|
+
const { startVitest } = await import('./cli-api.BvCJGado.js').then(function (n) { return n.h; }), ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
|
|
1345
1345
|
if (!ctx.shouldKeepServer()) await ctx.exit();
|
|
1346
1346
|
} catch (e) {
|
|
1347
1347
|
const { errorBanner } = await import('./index.DehVUBn4.js').then(function (n) { return n.u; });
|
|
@@ -1356,7 +1356,7 @@ async function init(project) {
|
|
|
1356
1356
|
}
|
|
1357
1357
|
async function collect(mode, cliFilters, options) {
|
|
1358
1358
|
try {
|
|
1359
|
-
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.
|
|
1359
|
+
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.BvCJGado.js').then(function (n) { return n.h; }), ctx = await prepareVitest(mode, {
|
|
1360
1360
|
...normalizeCliOptions(cliFilters, options),
|
|
1361
1361
|
watch: false,
|
|
1362
1362
|
run: true
|
|
@@ -10,7 +10,7 @@ import { A as API_PATH, c as configFiles, d as defaultBrowserPort, a as defaultP
|
|
|
10
10
|
import nodeos__default, { tmpdir } from 'node:os';
|
|
11
11
|
import { generateHash as generateHash$1, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, generateFileHash, limitConcurrency, createFileTask as createFileTask$1, hasFailed, getTasks, isTestCase } from '@vitest/runner/utils';
|
|
12
12
|
import { SnapshotManager } from '@vitest/snapshot/manager';
|
|
13
|
-
import { v as version$1 } from './cac.
|
|
13
|
+
import { v as version$1 } from './cac.BO_6jvrs.js';
|
|
14
14
|
import { c as createBirpc } from './index.Bgo3tNWt.js';
|
|
15
15
|
import { p as parse, s as stringify, b as TraceMap, o as originalPositionFor, c as ancestor, d as createDefinesScript, e as convertTasksToEvents } from './typechecker.DsKAhua5.js';
|
|
16
16
|
import require$$0$3 from 'events';
|
|
@@ -213,4 +213,4 @@ type RuntimeConfig = Pick<SerializedConfig, "allowOnly" | "testTimeout" | "hookT
|
|
|
213
213
|
type RuntimeOptions = Partial<RuntimeConfig>;
|
|
214
214
|
type BrowserTraceViewMode = "on" | "off" | "on-first-retry" | "on-all-retries" | "retain-on-failure";
|
|
215
215
|
|
|
216
|
-
export type { BrowserTraceViewMode as B, FakeTimerInstallOpts as F, RuntimeOptions as R,
|
|
216
|
+
export type { BrowserTraceViewMode as B, FakeTimerInstallOpts as F, RuntimeOptions as R, SerializedConfig as S, SerializedCoverageConfig as a, RuntimeConfig as b };
|
|
@@ -2,7 +2,7 @@ import { PromisifyAssertion, Tester, ExpectStatic } from '@vitest/expect';
|
|
|
2
2
|
import { Plugin } from '@vitest/pretty-format';
|
|
3
3
|
import { SnapshotState } from '@vitest/snapshot';
|
|
4
4
|
import { B as BenchmarkResult } from './benchmark.d.DAaHLpsq.js';
|
|
5
|
-
import { U as UserConsoleLog } from './worker.d.
|
|
5
|
+
import { U as UserConsoleLog } from './worker.d.DSgBAZPX.js';
|
|
6
6
|
|
|
7
7
|
interface SnapshotMatcher<T> {
|
|
8
8
|
<U extends { [P in keyof T] : any }>(snapshot: Partial<U>, hint?: string): void;
|
|
@@ -2,7 +2,7 @@ import * as _vitest_spy from '@vitest/spy';
|
|
|
2
2
|
import vm from 'node:vm';
|
|
3
3
|
import * as viteModuleRunner from 'vite/module-runner';
|
|
4
4
|
import { ModuleEvaluator, ModuleRunnerImportMeta, ModuleRunnerContext, EvaluatedModuleNode, FetchFunction, EvaluatedModules } from 'vite/module-runner';
|
|
5
|
-
import { a as RuntimeRPC, c as ResolveFunctionResult, W as WorkerGlobalState } from './worker.d.
|
|
5
|
+
import { a as RuntimeRPC, c as ResolveFunctionResult, W as WorkerGlobalState } from './worker.d.DSgBAZPX.js';
|
|
6
6
|
import { MockedModule, MockedModuleType } from '@vitest/mocker';
|
|
7
7
|
import { P as PendingSuiteMock, b as MockFactory, a as MockOptions } from './mocker.d.BE_2ls6u.js';
|
|
8
8
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CancelReason, TaskMeta, Suite, File, TestAnnotation, ImportDuration, Test, Task, TaskResultPack, SequenceSetupFiles, SequenceHooks } from '@vitest/runner';
|
|
2
2
|
import { Awaitable, ParsedStack, TestError, SerializedError, Arrayable } from '@vitest/utils';
|
|
3
|
-
import { P as ProvidedContext, A as AfterSuiteRunMeta, U as UserConsoleLog, L as LabelColor } from './worker.d.
|
|
3
|
+
import { P as ProvidedContext, A as AfterSuiteRunMeta, U as UserConsoleLog, L as LabelColor } from './worker.d.DSgBAZPX.js';
|
|
4
4
|
import { Writable } from 'node:stream';
|
|
5
5
|
import { Plugin, ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, DepOptimizationConfig, ServerOptions, ConfigEnv, AliasOptions } from 'vite';
|
|
6
6
|
import { MockedModule } from '@vitest/mocker';
|
|
7
7
|
import { StackTraceParserOptions } from '@vitest/utils/source-map';
|
|
8
8
|
import { BrowserCommands } from 'vitest/browser';
|
|
9
|
-
import { B as BrowserTraceViewMode,
|
|
10
|
-
import { B as BrowserTesterOptions, S as SerializedTestSpecification } from './browser.d.
|
|
9
|
+
import { B as BrowserTraceViewMode, S as SerializedConfig, F as FakeTimerInstallOpts } from './config.d.C4PpNy7v.js';
|
|
10
|
+
import { B as BrowserTesterOptions, S as SerializedTestSpecification } from './browser.d.CCG7W26I.js';
|
|
11
11
|
import { PrettyFormatOptions } from '@vitest/pretty-format';
|
|
12
12
|
import { SnapshotSummary, SnapshotStateOptions } from '@vitest/snapshot';
|
|
13
13
|
import { SerializedDiffOptions } from '@vitest/utils/diff';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CancelReason, File, TestAnnotation, TaskResultPack, TaskEventPack, FileSpecification, Task } from '@vitest/runner';
|
|
2
2
|
import { FetchFunctionOptions, FetchResult, EvaluatedModules } from 'vite/module-runner';
|
|
3
|
-
import {
|
|
3
|
+
import { S as SerializedConfig } from './config.d.C4PpNy7v.js';
|
|
4
4
|
import { E as Environment } from './environment.d.CrsxCzP1.js';
|
|
5
5
|
import { SnapshotResult } from '@vitest/snapshot';
|
|
6
6
|
|
package/dist/cli.js
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HookHandler, ConfigEnv, UserConfig } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { I as InlineConfig, c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport } from './chunks/reporters.d.
|
|
4
|
-
export { a as TestProjectConfiguration, g as TestProjectInlineConfiguration, f as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.
|
|
5
|
-
import { V as VitestPluginContext } from './chunks/plugin.d.
|
|
6
|
-
import { F as FakeTimerInstallOpts } from './chunks/config.d.
|
|
3
|
+
import { I as InlineConfig, c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport } from './chunks/reporters.d.DAyr7w3M.js';
|
|
4
|
+
export { a as TestProjectConfiguration, g as TestProjectInlineConfiguration, f as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.DAyr7w3M.js';
|
|
5
|
+
import { V as VitestPluginContext } from './chunks/plugin.d.CqKwuCSa.js';
|
|
6
|
+
import { F as FakeTimerInstallOpts } from './chunks/config.d.C4PpNy7v.js';
|
|
7
7
|
import '@vitest/runner';
|
|
8
8
|
import '@vitest/utils';
|
|
9
|
-
import './chunks/worker.d.
|
|
9
|
+
import './chunks/worker.d.DSgBAZPX.js';
|
|
10
10
|
import 'vite/module-runner';
|
|
11
11
|
import './chunks/environment.d.CrsxCzP1.js';
|
|
12
12
|
import '@vitest/snapshot';
|
|
@@ -14,7 +14,7 @@ import 'node:stream';
|
|
|
14
14
|
import '@vitest/mocker';
|
|
15
15
|
import '@vitest/utils/source-map';
|
|
16
16
|
import 'vitest/browser';
|
|
17
|
-
import './chunks/browser.d.
|
|
17
|
+
import './chunks/browser.d.CCG7W26I.js';
|
|
18
18
|
import '@vitest/pretty-format';
|
|
19
19
|
import '@vitest/utils/diff';
|
|
20
20
|
import '@vitest/expect';
|
|
@@ -92,6 +92,7 @@ type ViteUserConfigExport = UserConfig | Promise<UserConfig> | ViteUserConfigFnO
|
|
|
92
92
|
declare function defineConfig(config: UserConfig): UserConfig;
|
|
93
93
|
declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
|
|
94
94
|
declare function defineConfig(config: ViteUserConfigFnObject): ViteUserConfigFnObject;
|
|
95
|
+
declare function defineConfig(config: ViteUserConfigFnPromise): ViteUserConfigFnPromise;
|
|
95
96
|
declare function defineConfig(config: ViteUserConfigExport): ViteUserConfigExport;
|
|
96
97
|
declare function defineProject(config: UserWorkspaceConfig): UserWorkspaceConfig;
|
|
97
98
|
declare function defineProject(config: Promise<UserWorkspaceConfig>): Promise<UserWorkspaceConfig>;
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, b as ReportContext } from './chunks/reporters.d.
|
|
1
|
+
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, b as ReportContext } from './chunks/reporters.d.DAyr7w3M.js';
|
|
2
2
|
import { TransformResult } from 'vite';
|
|
3
|
-
import { A as AfterSuiteRunMeta } from './chunks/worker.d.
|
|
3
|
+
import { A as AfterSuiteRunMeta } from './chunks/worker.d.DSgBAZPX.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import '@vitest/utils';
|
|
6
6
|
import 'node:stream';
|
|
7
7
|
import '@vitest/mocker';
|
|
8
8
|
import '@vitest/utils/source-map';
|
|
9
9
|
import 'vitest/browser';
|
|
10
|
-
import './chunks/config.d.
|
|
10
|
+
import './chunks/config.d.C4PpNy7v.js';
|
|
11
11
|
import '@vitest/pretty-format';
|
|
12
12
|
import '@vitest/snapshot';
|
|
13
13
|
import '@vitest/utils/diff';
|
|
14
|
-
import './chunks/browser.d.
|
|
14
|
+
import './chunks/browser.d.CCG7W26I.js';
|
|
15
15
|
import '@vitest/expect';
|
|
16
16
|
import 'vitest/optional-types.js';
|
|
17
17
|
import './chunks/benchmark.d.DAaHLpsq.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { S as SerializedTestSpecification } from './chunks/browser.d.
|
|
2
|
-
export { B as BrowserTesterOptions } from './chunks/browser.d.
|
|
3
|
-
import './chunks/global.d.
|
|
1
|
+
import { S as SerializedTestSpecification } from './chunks/browser.d.CCG7W26I.js';
|
|
2
|
+
export { B as BrowserTesterOptions } from './chunks/browser.d.CCG7W26I.js';
|
|
3
|
+
import './chunks/global.d.D1pbKXir.js';
|
|
4
4
|
import { File, TestAnnotation, TaskResultPack, TaskEventPack, TaskPopulated } from '@vitest/runner';
|
|
5
5
|
export { CancelReason, ImportDuration, OnTestFailedHandler, OnTestFinishedHandler, RunMode, 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, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestAnnotation, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
6
6
|
import { Awaitable } from '@vitest/utils';
|
|
7
7
|
export { ParsedStack, SerializedError, TestError } from '@vitest/utils';
|
|
8
|
-
import { U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, B as BirpcReturn, P as ProvidedContext } from './chunks/worker.d.
|
|
9
|
-
export { A as AfterSuiteRunMeta, C as ContextRPC, b as ContextTestEnvironment, R as RunnerRPC, a as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.
|
|
10
|
-
import {
|
|
11
|
-
export { b as RuntimeConfig,
|
|
8
|
+
import { U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, B as BirpcReturn, P as ProvidedContext } from './chunks/worker.d.DSgBAZPX.js';
|
|
9
|
+
export { A as AfterSuiteRunMeta, C as ContextRPC, b as ContextTestEnvironment, R as RunnerRPC, a as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.DSgBAZPX.js';
|
|
10
|
+
import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.C4PpNy7v.js';
|
|
11
|
+
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.d.C4PpNy7v.js';
|
|
12
12
|
import { ExpectStatic } from '@vitest/expect';
|
|
13
13
|
export { Assertion, AsymmetricMatchersContaining, DeeplyAllowMatchers, ExpectPollOptions, ExpectStatic, JestAssertion, Matchers, chai } from '@vitest/expect';
|
|
14
14
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'vite/module-runner';
|
|
2
|
-
export { b as VitestModuleEvaluator, a as VitestModuleEvaluatorOptions, c as createImportMetaEnvProxy, g as getDefaultRequestStubs, i as isPrimitive, u as unwrapId, w as wrapId } from './chunks/moduleRunner.d.
|
|
2
|
+
export { b as VitestModuleEvaluator, a as VitestModuleEvaluatorOptions, c as createImportMetaEnvProxy, g as getDefaultRequestStubs, i as isPrimitive, u as unwrapId, w as wrapId } from './chunks/moduleRunner.d.aXWuQhZN.js';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import '@vitest/spy';
|
|
5
|
-
import './chunks/worker.d.
|
|
5
|
+
import './chunks/worker.d.DSgBAZPX.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
|
-
import './chunks/config.d.
|
|
7
|
+
import './chunks/config.d.C4PpNy7v.js';
|
|
8
8
|
import '@vitest/pretty-format';
|
|
9
9
|
import '@vitest/snapshot';
|
|
10
10
|
import '@vitest/utils/diff';
|
package/dist/node.d.ts
CHANGED
|
@@ -3,24 +3,24 @@ import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as Res
|
|
|
3
3
|
export { vite as Vite };
|
|
4
4
|
export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
5
5
|
import { IncomingMessage } from 'node:http';
|
|
6
|
-
import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, k as TestSpecification, T as TestProject, P as Pool, l as TestSequencer, L as Logger } from './chunks/reporters.d.
|
|
7
|
-
export { ao as BaseCoverageOptions, G as BenchmarkUserOptions, K as BrowserBuiltinProvider, N as BrowserCommand, Q as BrowserCommandContext, X as BrowserConfigOptions, Y as BrowserInstanceOption, Z as BrowserModuleMocker, $ as BrowserOrchestrator, a0 as BrowserProvider, a1 as BrowserProviderOption, a2 as BrowserScript, a3 as BrowserServerFactory, a4 as BrowserServerOptions, a5 as BrowserServerState, a6 as BrowserServerStateSession, ad as BuiltinEnvironment, a7 as CDPSession, ae as CSSModuleScopeStrategy, ap as CoverageIstanbulOptions, aq as CoverageOptions, ar as CoverageProvider, as as CoverageProviderModule, at as CoverageReporter, c as CoverageV8Options, au as CustomProviderOptions, af as DepsOptimizationOptions, ag as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, o as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, m as OnTestsRerunHandler, a8 as ParentProjectBrowser, ah as PoolOptions, a9 as ProjectBrowser, ai as ProjectConfig, b as ReportContext, aw as ReportedHookContext, ax as Reporter, ak as ResolveSnapshotPathHandler, al as ResolveSnapshotPathHandlerContext, aa as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aj as ResolvedProjectConfig, S as SerializedTestProject, p as TaskOptions, q as TestCase, r as TestCollection, s as TestDiagnostic, t as TestModule, u as TestModuleState, v as TestResult, w as TestResultFailed, x as TestResultPassed, y as TestResultSkipped, ay as TestRunEndReason, av as TestRunResult, F as TestSequencerConstructor, z as TestState, B as TestSuite, D as TestSuiteState, ab as ToMatchScreenshotComparators, ac as ToMatchScreenshotOptions, am as TypecheckConfig, U as UserWorkspaceConfig, an as VitestEnvironment, n as VitestPackageInstaller, W as WatcherTriggerPattern, _ as _BrowserNames, E as experimental_getRunnerTask } from './chunks/reporters.d.
|
|
6
|
+
import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, k as TestSpecification, T as TestProject, P as Pool, l as TestSequencer, L as Logger } from './chunks/reporters.d.DAyr7w3M.js';
|
|
7
|
+
export { ao as BaseCoverageOptions, G as BenchmarkUserOptions, K as BrowserBuiltinProvider, N as BrowserCommand, Q as BrowserCommandContext, X as BrowserConfigOptions, Y as BrowserInstanceOption, Z as BrowserModuleMocker, $ as BrowserOrchestrator, a0 as BrowserProvider, a1 as BrowserProviderOption, a2 as BrowserScript, a3 as BrowserServerFactory, a4 as BrowserServerOptions, a5 as BrowserServerState, a6 as BrowserServerStateSession, ad as BuiltinEnvironment, a7 as CDPSession, ae as CSSModuleScopeStrategy, ap as CoverageIstanbulOptions, aq as CoverageOptions, ar as CoverageProvider, as as CoverageProviderModule, at as CoverageReporter, c as CoverageV8Options, au as CustomProviderOptions, af as DepsOptimizationOptions, ag as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, o as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, m as OnTestsRerunHandler, a8 as ParentProjectBrowser, ah as PoolOptions, a9 as ProjectBrowser, ai as ProjectConfig, b as ReportContext, aw as ReportedHookContext, ax as Reporter, ak as ResolveSnapshotPathHandler, al as ResolveSnapshotPathHandlerContext, aa as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aj as ResolvedProjectConfig, S as SerializedTestProject, p as TaskOptions, q as TestCase, r as TestCollection, s as TestDiagnostic, t as TestModule, u as TestModuleState, v as TestResult, w as TestResultFailed, x as TestResultPassed, y as TestResultSkipped, ay as TestRunEndReason, av as TestRunResult, F as TestSequencerConstructor, z as TestState, B as TestSuite, D as TestSuiteState, ab as ToMatchScreenshotComparators, ac as ToMatchScreenshotOptions, am as TypecheckConfig, U as UserWorkspaceConfig, an as VitestEnvironment, n as VitestPackageInstaller, W as WatcherTriggerPattern, _ as _BrowserNames, E as experimental_getRunnerTask } from './chunks/reporters.d.DAyr7w3M.js';
|
|
8
8
|
import { Awaitable } from '@vitest/utils';
|
|
9
9
|
export { SerializedError } from '@vitest/utils';
|
|
10
|
-
import { a as RuntimeRPC, C as ContextRPC } from './chunks/worker.d.
|
|
11
|
-
export { T as TestExecutionType } from './chunks/worker.d.
|
|
10
|
+
import { a as RuntimeRPC, C as ContextRPC } from './chunks/worker.d.DSgBAZPX.js';
|
|
11
|
+
export { T as TestExecutionType } from './chunks/worker.d.DSgBAZPX.js';
|
|
12
12
|
import { Writable } from 'node:stream';
|
|
13
|
-
export { V as VitestPluginContext } from './chunks/plugin.d.
|
|
13
|
+
export { V as VitestPluginContext } from './chunks/plugin.d.CqKwuCSa.js';
|
|
14
14
|
import { MessagePort } from 'node:worker_threads';
|
|
15
15
|
import { Debugger } from 'debug';
|
|
16
|
-
import './chunks/global.d.
|
|
16
|
+
import './chunks/global.d.D1pbKXir.js';
|
|
17
17
|
export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
18
|
-
export { b as RuntimeConfig } from './chunks/config.d.
|
|
18
|
+
export { b as RuntimeConfig } from './chunks/config.d.C4PpNy7v.js';
|
|
19
19
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
20
20
|
import '@vitest/mocker';
|
|
21
21
|
import '@vitest/utils/source-map';
|
|
22
22
|
import 'vitest/browser';
|
|
23
|
-
import './chunks/browser.d.
|
|
23
|
+
import './chunks/browser.d.CCG7W26I.js';
|
|
24
24
|
import '@vitest/pretty-format';
|
|
25
25
|
import '@vitest/snapshot';
|
|
26
26
|
import '@vitest/utils/diff';
|
package/dist/node.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import { resolveConfig as resolveConfig$1, mergeConfig } from 'vite';
|
|
3
3
|
export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
4
|
-
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.
|
|
5
|
-
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, g as createViteLogger, c as createVitest, e as escapeTestName, d as experimental_getRunnerTask, i as isValidApiRequest, f as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.
|
|
6
|
-
export { p as parseCLI } from './chunks/cac.
|
|
4
|
+
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.BvCJGado.js';
|
|
5
|
+
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, g as createViteLogger, c as createVitest, e as escapeTestName, d as experimental_getRunnerTask, i as isValidApiRequest, f as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.BvCJGado.js';
|
|
6
|
+
export { p as parseCLI } from './chunks/cac.BO_6jvrs.js';
|
|
7
7
|
import { r as resolveConfig$2 } from './chunks/coverage.3htTSxXZ.js';
|
|
8
8
|
export { b as BaseSequencer, d as createDebugger, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.3htTSxXZ.js';
|
|
9
9
|
import { slash, deepClone } from '@vitest/utils/helpers';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { aM as BaseReporter, 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, ax as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ay as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.d.
|
|
1
|
+
export { aM as BaseReporter, 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, ax as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ay as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.d.DAyr7w3M.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
3
|
import '@vitest/utils';
|
|
4
|
-
import './chunks/worker.d.
|
|
4
|
+
import './chunks/worker.d.DSgBAZPX.js';
|
|
5
5
|
import 'vite/module-runner';
|
|
6
|
-
import './chunks/config.d.
|
|
6
|
+
import './chunks/config.d.C4PpNy7v.js';
|
|
7
7
|
import '@vitest/pretty-format';
|
|
8
8
|
import '@vitest/snapshot';
|
|
9
9
|
import '@vitest/utils/diff';
|
|
@@ -13,7 +13,7 @@ import 'vite';
|
|
|
13
13
|
import '@vitest/mocker';
|
|
14
14
|
import '@vitest/utils/source-map';
|
|
15
15
|
import 'vitest/browser';
|
|
16
|
-
import './chunks/browser.d.
|
|
16
|
+
import './chunks/browser.d.CCG7W26I.js';
|
|
17
17
|
import '@vitest/expect';
|
|
18
18
|
import 'vitest/optional-types.js';
|
|
19
19
|
import './chunks/benchmark.d.DAaHLpsq.js';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as tinybench from 'tinybench';
|
|
2
2
|
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, TestContext, ImportDuration } from '@vitest/runner';
|
|
3
3
|
export { VitestRunner } from '@vitest/runner';
|
|
4
|
-
import {
|
|
4
|
+
import { S as SerializedConfig } from './chunks/config.d.C4PpNy7v.js';
|
|
5
5
|
import '@vitest/pretty-format';
|
|
6
6
|
import '@vitest/snapshot';
|
|
7
7
|
import '@vitest/utils/diff';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.17",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -127,13 +127,13 @@
|
|
|
127
127
|
"peerDependencies": {
|
|
128
128
|
"@edge-runtime/vm": "*",
|
|
129
129
|
"@types/debug": "^4.1.12",
|
|
130
|
-
"@types/node": "^
|
|
130
|
+
"@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
|
|
131
131
|
"happy-dom": "*",
|
|
132
132
|
"jsdom": "*",
|
|
133
|
-
"@vitest/browser-playwright": "4.0.0-beta.
|
|
134
|
-
"@vitest/browser-
|
|
135
|
-
"@vitest/browser-
|
|
136
|
-
"@vitest/ui": "4.0.0-beta.
|
|
133
|
+
"@vitest/browser-playwright": "4.0.0-beta.17",
|
|
134
|
+
"@vitest/browser-preview": "4.0.0-beta.17",
|
|
135
|
+
"@vitest/browser-webdriverio": "4.0.0-beta.17",
|
|
136
|
+
"@vitest/ui": "4.0.0-beta.17"
|
|
137
137
|
},
|
|
138
138
|
"peerDependenciesMeta": {
|
|
139
139
|
"@edge-runtime/vm": {
|
|
@@ -177,15 +177,15 @@
|
|
|
177
177
|
"tinyglobby": "^0.2.15",
|
|
178
178
|
"tinypool": "^2.0.0",
|
|
179
179
|
"tinyrainbow": "^3.0.3",
|
|
180
|
-
"vite": "^6.0.0 || ^7.0.0
|
|
180
|
+
"vite": "^6.0.0 || ^7.0.0",
|
|
181
181
|
"why-is-node-running": "^2.3.0",
|
|
182
|
-
"@vitest/
|
|
183
|
-
"@vitest/
|
|
184
|
-
"@vitest/
|
|
185
|
-
"@vitest/
|
|
186
|
-
"@vitest/
|
|
187
|
-
"@vitest/
|
|
188
|
-
"@vitest/utils": "4.0.0-beta.
|
|
182
|
+
"@vitest/expect": "4.0.0-beta.17",
|
|
183
|
+
"@vitest/mocker": "4.0.0-beta.17",
|
|
184
|
+
"@vitest/pretty-format": "4.0.0-beta.17",
|
|
185
|
+
"@vitest/runner": "4.0.0-beta.17",
|
|
186
|
+
"@vitest/snapshot": "4.0.0-beta.17",
|
|
187
|
+
"@vitest/spy": "4.0.0-beta.17",
|
|
188
|
+
"@vitest/utils": "4.0.0-beta.17"
|
|
189
189
|
},
|
|
190
190
|
"devDependencies": {
|
|
191
191
|
"@antfu/install-pkg": "^1.1.0",
|
|
@@ -212,8 +212,7 @@
|
|
|
212
212
|
"mime": "^4.1.0",
|
|
213
213
|
"prompts": "^2.4.2",
|
|
214
214
|
"strip-literal": "^3.0.0",
|
|
215
|
-
"ws": "^8.18.3"
|
|
216
|
-
"@vitest/browser-playwright": "4.0.0-beta.15"
|
|
215
|
+
"ws": "^8.18.3"
|
|
217
216
|
},
|
|
218
217
|
"scripts": {
|
|
219
218
|
"build": "premove dist && rollup -c",
|