vitest 5.1.0-beta.1 → 5.1.0
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 +6 -5
- package/dist/browser.js +6 -6
- package/dist/chunks/{base.PJyN9N0u.js → base.Cof-UHJf.js} +14 -19
- package/dist/chunks/{browser.d.D7a15z82.d.ts → browser.d.C7tWgUvw.d.ts} +3 -3
- package/dist/chunks/{cac.Ccf5Je_F.js → cac.BYbt0aJp.js} +22 -20
- package/dist/chunks/{cli-api.DE22LIzq.js → cli-api.COfZo8lK.js} +714 -73
- package/dist/chunks/{config.d.BgktgHfG.d.ts → config.d.B3YV4t0O.d.ts} +37 -2
- package/dist/chunks/{console.DrMPSuFo.js → console.CQZ877Hi.js} +2 -2
- package/dist/chunks/{coverage.-bm5IxnW.js → coverage.9iqXE2gN.js} +1 -1
- package/dist/chunks/{coverage.cTDc4uSS.js → coverage.jGCktcGP.js} +1 -1
- package/dist/chunks/{creator.BQ3onxbh.js → creator.DHWmytIK.js} +10 -10
- package/dist/chunks/{doctor.CPlMs7-y.js → doctor.B-oPbwps.js} +2 -2
- package/dist/chunks/{environment.d.CbTLsZSj.d.ts → environment.d.BFQtFKdZ.d.ts} +1 -1
- package/dist/chunks/{globals.TipXUFcZ.js → globals.ZKtKSkEf.js} +6 -5
- package/dist/chunks/{index.BFXLpwll.js → index.Bi0NXYPf.js} +58 -32
- package/dist/chunks/{index.BXttT2gP.js → index.CZzC1gGg.js} +265 -425
- package/dist/chunks/{index.D14IAvnE.js → index.Di8au7q4.js} +68 -62
- package/dist/chunks/{index.B03wg4V0.js → index.w_oBZ9N8.js} +5 -5
- package/dist/chunks/{init-forks.BL1E3__4.js → init-forks.BaDXQSD8.js} +1 -1
- package/dist/chunks/{init-threads.CYXAGzKQ.js → init-threads.ZX_Vov0z.js} +1 -1
- package/dist/chunks/{init.DVorxUyL.js → init.CO4AB7HZ.js} +4 -4
- package/dist/chunks/{module-dependencies.CwNPkcV4.js → module-dependencies._2Eei3FO.js} +1 -1
- package/dist/chunks/{native.cdzHIdmv.js → native.upB-V0CK.js} +1 -1
- package/dist/chunks/{nativeModuleMocker.3uBcOd84.js → nativeModuleMocker.Dh5azSB4.js} +3 -3
- package/dist/chunks/{nativeModuleRunner.xi64Afb2.js → nativeModuleRunner.9xPIMzi7.js} +1 -1
- package/dist/chunks/{node.uQulW0ei.js → node.B9mkVmLH.js} +1 -1
- package/dist/chunks/{pathe.M-eThtNZ.Ba-7h1rE.js → pathe.M-eThtNZ.zq3TM4NT.js} +1 -1
- package/dist/chunks/{plugin.d.olEn8IL9.d.ts → plugin.d.LRFSN46m.d.ts} +90 -19
- package/dist/chunks/rawSnapshot.DqSiqIEx.js +356 -0
- package/dist/chunks/{resolver.CtCcxIy1.js → resolver.BzpmeQeT.js} +1 -1
- package/dist/chunks/{rpc.BV0XpJ5q.js → rpc.Uhkwr2NM.js} +2 -2
- package/dist/chunks/{rpc.d.DGFP7vWr.d.ts → rpc.d.3FOhdFx8.d.ts} +1 -1
- package/dist/chunks/{run.BfrMbGVD.js → run.CjdgFZiW.js} +7 -4
- package/dist/chunks/{setup-common.llxJkJaD.js → setup-common.CqAQCXzx.js} +2 -2
- package/dist/chunks/{source-map.BjWcsIL9.js → source-map.DakdQc29.js} +11 -13
- package/dist/chunks/{source-map.d.C5A_Tr6V.d.ts → source-map.d.BkG8YK_3.d.ts} +1 -1
- package/dist/chunks/{task-utils.d.BUh7ylUT.d.ts → task-utils.d.D-gFPNFi.d.ts} +1 -1
- package/dist/chunks/{utils.DSfl_w8V.js → utils.BBk_icFG.js} +6 -3
- package/dist/chunks/{vm.Cwj01UFE.js → vm.b4MbCAJQ.js} +15 -13
- package/dist/chunks/{worker.d.gsA26mmR.d.ts → worker.d.CyJRpyfZ.d.ts} +3 -3
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +8 -8
- package/dist/index.d.ts +17 -12
- package/dist/index.js +6 -5
- package/dist/module-evaluator.d.ts +2 -2
- package/dist/node.d.ts +10 -10
- package/dist/node.js +15 -13
- package/dist/runtime.d.ts +4 -4
- package/dist/runtime.js +4 -4
- package/dist/task-utils.js +7 -3
- package/dist/worker.d.ts +4 -4
- package/dist/worker.js +14 -13
- package/dist/workers/forks.js +15 -14
- package/dist/workers/runVmTests.js +13 -10
- package/dist/workers/threads.js +15 -14
- package/dist/workers/vmForks.js +10 -10
- package/dist/workers/vmThreads.js +10 -10
- package/package.json +15 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from './index.D0heQG4v.js';
|
|
2
|
-
import {
|
|
2
|
+
import { p as isPrimitive, q as notNullish, r as resolve$1 } from './pathe.M-eThtNZ.zq3TM4NT.js';
|
|
3
3
|
|
|
4
4
|
var build = {};
|
|
5
5
|
|
|
@@ -947,7 +947,7 @@ for (let i = 0; i < chars.length; i++) {
|
|
|
947
947
|
intToChar[i] = c;
|
|
948
948
|
charToInt[c] = i;
|
|
949
949
|
}
|
|
950
|
-
function decodeInteger(reader
|
|
950
|
+
function decodeInteger(reader) {
|
|
951
951
|
let value = 0;
|
|
952
952
|
let shift = 0;
|
|
953
953
|
let integer = 0;
|
|
@@ -957,12 +957,10 @@ function decodeInteger(reader, relative) {
|
|
|
957
957
|
value |= (integer & 31) << shift;
|
|
958
958
|
shift += 5;
|
|
959
959
|
} while (integer & 32);
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
}
|
|
965
|
-
return relative + value;
|
|
960
|
+
return value;
|
|
961
|
+
}
|
|
962
|
+
function decodeSign(num) {
|
|
963
|
+
return num & 1 ? -2147483648 | -(num >>> 1) : num >>> 1;
|
|
966
964
|
}
|
|
967
965
|
function hasMoreVlq(reader, max) {
|
|
968
966
|
if (reader.pos >= max) return false;
|
|
@@ -1004,15 +1002,15 @@ function decode(mappings) {
|
|
|
1004
1002
|
genColumn = 0;
|
|
1005
1003
|
while (reader.pos < semi) {
|
|
1006
1004
|
let seg;
|
|
1007
|
-
genColumn
|
|
1005
|
+
genColumn += decodeSign(decodeInteger(reader));
|
|
1008
1006
|
if (genColumn < lastCol) sorted = false;
|
|
1009
1007
|
lastCol = genColumn;
|
|
1010
1008
|
if (hasMoreVlq(reader, semi)) {
|
|
1011
|
-
sourcesIndex
|
|
1012
|
-
sourceLine
|
|
1013
|
-
sourceColumn
|
|
1009
|
+
sourcesIndex += decodeSign(decodeInteger(reader));
|
|
1010
|
+
sourceLine += decodeSign(decodeInteger(reader));
|
|
1011
|
+
sourceColumn += decodeSign(decodeInteger(reader));
|
|
1014
1012
|
if (hasMoreVlq(reader, semi)) {
|
|
1015
|
-
namesIndex
|
|
1013
|
+
namesIndex += decodeSign(decodeInteger(reader));
|
|
1016
1014
|
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
|
|
1017
1015
|
} else {
|
|
1018
1016
|
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="chai" />
|
|
2
|
-
import {
|
|
2
|
+
import { bq as SnapshotState, n as Test, br as PromisifyAssertion, bs as Tester, bt as Plugin, ae as BenchResult, a as File } from './config.d.B3YV4t0O.js';
|
|
3
3
|
|
|
4
4
|
interface SnapshotMatcher<
|
|
5
5
|
R extends void | Promise<void>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { stripVTControlCharacters } from 'node:util';
|
|
2
2
|
import { t as truncateString$1 } from './display.BlTmubjj.js';
|
|
3
|
-
import { i as isAbsolute, a as relative, d as dirname, b as basename, s as slash } from './pathe.M-eThtNZ.
|
|
3
|
+
import { i as isAbsolute, a as relative, d as dirname, b as basename, s as slash } from './pathe.M-eThtNZ.zq3TM4NT.js';
|
|
4
4
|
import { $ } from './tinyrainbow.Do8I1XRG.js';
|
|
5
5
|
|
|
6
6
|
const F_RIGHT = "→";
|
|
@@ -149,7 +149,9 @@ function padSummaryTitle(str) {
|
|
|
149
149
|
return $.dim(`${str.padStart(11)} `);
|
|
150
150
|
}
|
|
151
151
|
function truncateString(text, maxLength) {
|
|
152
|
-
|
|
152
|
+
const plainText = stripVTControlCharacters(text);
|
|
153
|
+
if (plainText.length <= maxLength) return text;
|
|
154
|
+
return truncateString$1(plainText, maxLength);
|
|
153
155
|
}
|
|
154
156
|
function capitalize(text) {
|
|
155
157
|
return `${text[0].toUpperCase()}${text.slice(1)}`;
|
|
@@ -170,6 +172,7 @@ var utils = /*#__PURE__*/Object.freeze({
|
|
|
170
172
|
formatProjectName: formatProjectName,
|
|
171
173
|
formatTime: formatTime,
|
|
172
174
|
formatTimeString: formatTimeString,
|
|
175
|
+
getCols: getCols,
|
|
173
176
|
getStateString: getStateString,
|
|
174
177
|
getStateSymbol: getStateSymbol,
|
|
175
178
|
noun: noun,
|
|
@@ -181,4 +184,4 @@ var utils = /*#__PURE__*/Object.freeze({
|
|
|
181
184
|
withLabel: withLabel
|
|
182
185
|
});
|
|
183
186
|
|
|
184
|
-
export {
|
|
187
|
+
export { F_TREE_NODE_MIDDLE as F, F_TREE_NODE_END as a, F_CHECK as b, F_POINTER as c, F_DOWN_RIGHT as d, formatProjectName as e, formatTimeString as f, getStateSymbol as g, getStateString as h, formatTime as i, countTestErrors as j, errorBanner as k, divider as l, F_RIGHT as m, noun as n, getCols as o, padSummaryTitle as p, truncateString as q, renderSnapshotSummary as r, separator as s, taskFail as t, utils as u, withLabel as w };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
2
2
|
import v8 from 'node:v8';
|
|
3
3
|
import vm, { isContext, runInContext } from 'node:vm';
|
|
4
|
-
import { l as loadEnvironment, a as listenForErrors, e as emitModuleRunner } from './init.
|
|
4
|
+
import { l as loadEnvironment, a as listenForErrors, e as emitModuleRunner } from './init.CO4AB7HZ.js';
|
|
5
5
|
import { distDir } from '../path.js';
|
|
6
|
-
import { createCustomConsole } from './console.
|
|
6
|
+
import { createCustomConsole } from './console.CQZ877Hi.js';
|
|
7
7
|
import fs__default from 'node:fs';
|
|
8
8
|
import { createRequire, Module, isBuiltin } from 'node:module';
|
|
9
|
-
import { d as dirname,
|
|
10
|
-
import { l as lookupPackageScopeType } from './resolver.
|
|
9
|
+
import { d as dirname, k as extname, b as basename, C as CSS_LANGS_RE, l as KNOWN_ASSET_RE, t as toArray, m as splitFileAndPostfix, n as normalize, o as isBareImport, r as resolve } from './pathe.M-eThtNZ.zq3TM4NT.js';
|
|
10
|
+
import { l as lookupPackageScopeType } from './resolver.BzpmeQeT.js';
|
|
11
11
|
import { initSync, parse } from 'es-module-lexer';
|
|
12
12
|
import { dirname as dirname$1 } from 'node:path';
|
|
13
|
-
import { V as VITEST_VM_CONTEXT_SYMBOL, s as startVitestModuleRunner, c as createNodeImportMeta } from './index.
|
|
13
|
+
import { V as VITEST_VM_CONTEXT_SYMBOL, s as startVitestModuleRunner, c as createNodeImportMeta } from './index.Bi0NXYPf.js';
|
|
14
14
|
import { getDefaultRequestStubs } from '../module-evaluator.js';
|
|
15
|
-
import { b as setupEnv } from './setup-common.
|
|
15
|
+
import { b as setupEnv } from './setup-common.CqAQCXzx.js';
|
|
16
16
|
import { p as provideWorkerState } from './utils.DYj33du9.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -344,7 +344,8 @@ class CommonjsExecutor {
|
|
|
344
344
|
}
|
|
345
345
|
requireJs = (m, filename) => {
|
|
346
346
|
const content = this.fs.readFile(filename);
|
|
347
|
-
|
|
347
|
+
const code = content.startsWith("#!") ? `//${content.slice(2)}` : content;
|
|
348
|
+
m._compile(code, filename);
|
|
348
349
|
};
|
|
349
350
|
requireJson = (m, filename) => {
|
|
350
351
|
const code = this.fs.readFile(filename);
|
|
@@ -1243,20 +1244,21 @@ async function runVmTests(method, state, traces) {
|
|
|
1243
1244
|
if (!vm.getVmContext) throw new TypeError(`Environment ${environment.name} doesn't provide "getVmContext" method. It should return a context created by "vm.createContext" method.`);
|
|
1244
1245
|
const context = vm.getVmContext();
|
|
1245
1246
|
if (!isContext(context)) throw new TypeError(`Environment ${environment.name} doesn't provide a valid context. It should be created by "vm.createContext" method.`);
|
|
1246
|
-
// captured before vitest installs its own globals (worker state, console,
|
|
1247
|
-
// mocker, executor symbol): they reference the test file's module graph, so
|
|
1248
|
-
// the teardown strip must treat them as removable, not as pristine
|
|
1249
|
-
const initialContextKeys = captureContextKeys(context);
|
|
1250
|
-
provideWorkerState(context, state);
|
|
1251
1247
|
// this is unfortunately needed for our own dependencies
|
|
1252
1248
|
// we need to find a way to not rely on this by default
|
|
1253
1249
|
// because browser doesn't provide these globals
|
|
1254
1250
|
context.process = process;
|
|
1255
1251
|
context.global = context;
|
|
1256
|
-
context.console = state.config.disableConsoleIntercept ? console : createCustomConsole(state);
|
|
1257
1252
|
// TODO: don't hardcode setImmediate in fake timers defaults
|
|
1258
1253
|
context.setImmediate = setImmediate;
|
|
1259
1254
|
context.clearImmediate = clearImmediate;
|
|
1255
|
+
// captured before vitest installs its own globals (worker state, console,
|
|
1256
|
+
// mocker, executor symbol): they reference the test file's module graph, so
|
|
1257
|
+
// the teardown strip must treat them as removable, not as pristine. The
|
|
1258
|
+
// globals above are kept, work a test file didn't await may still use them
|
|
1259
|
+
const initialContextKeys = captureContextKeys(context);
|
|
1260
|
+
provideWorkerState(context, state);
|
|
1261
|
+
context.console = state.config.disableConsoleIntercept ? console : createCustomConsole(state);
|
|
1260
1262
|
const stubs = getDefaultRequestStubs(context);
|
|
1261
1263
|
const externalModulesExecutor = new ExternalModulesExecutor({
|
|
1262
1264
|
context,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EvaluatedModules } from 'vite/module-runner';
|
|
2
|
-
import { F as FileSpecification, b as SerializedConfig, Y as Task, Z as CancelReason } from './config.d.
|
|
3
|
-
import { a as RuntimeRPC, R as RunnerRPC, G as GetterTracker } from './rpc.d.
|
|
4
|
-
import { E as Environment } from './environment.d.
|
|
2
|
+
import { F as FileSpecification, b as SerializedConfig, Y as Task, Z as CancelReason } from './config.d.B3YV4t0O.js';
|
|
3
|
+
import { a as RuntimeRPC, R as RunnerRPC, G as GetterTracker } from './rpc.d.3FOhdFx8.js';
|
|
4
|
+
import { E as Environment } from './environment.d.BFQtFKdZ.js';
|
|
5
5
|
|
|
6
6
|
//#region src/messages.d.ts
|
|
7
7
|
declare const TYPE_REQUEST: "q";
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createCLI } from './chunks/cac.
|
|
2
|
-
import './chunks/pathe.M-eThtNZ.
|
|
1
|
+
import { c as createCLI } from './chunks/cac.BYbt0aJp.js';
|
|
2
|
+
import './chunks/pathe.M-eThtNZ.zq3TM4NT.js';
|
|
3
3
|
import 'events';
|
|
4
4
|
import './chunks/tinyrainbow.Do8I1XRG.js';
|
|
5
5
|
import './chunks/env.BKKtU2WC.js';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { HookHandler, UserConfig, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { F as FieldsWithDefaultValues, U as UserWorkspaceConfig, a as UserProjectConfigFn, b as UserProjectConfigExport } from './chunks/plugin.d.
|
|
3
|
+
import { F as FieldsWithDefaultValues, U as UserWorkspaceConfig, a as UserProjectConfigFn, b as UserProjectConfigExport } from './chunks/plugin.d.LRFSN46m.js';
|
|
4
4
|
import { InlineConfig, ResolvedConfig, VitestPluginContext, CoverageOptions } from './node.js';
|
|
5
|
-
export { T as TestProjectConfiguration, c as TestProjectInlineConfiguration, d as TestUserConfig, W as WatcherTriggerPattern } from './chunks/plugin.d.
|
|
5
|
+
export { T as TestProjectConfiguration, c as TestProjectInlineConfiguration, d as TestUserConfig, W as WatcherTriggerPattern } from './chunks/plugin.d.LRFSN46m.js';
|
|
6
6
|
import { FakeTimersConfig } from './index.js';
|
|
7
|
-
export { g as TestTagDefinition } from './chunks/config.d.
|
|
7
|
+
export { g as TestTagDefinition } from './chunks/config.d.B3YV4t0O.js';
|
|
8
8
|
import 'node:stream';
|
|
9
|
-
import './chunks/browser.d.
|
|
10
|
-
import './chunks/rpc.d.
|
|
9
|
+
import './chunks/browser.d.C7tWgUvw.js';
|
|
10
|
+
import './chunks/rpc.d.3FOhdFx8.js';
|
|
11
11
|
import 'vite/module-runner';
|
|
12
|
-
import './chunks/worker.d.
|
|
13
|
-
import './chunks/environment.d.
|
|
12
|
+
import './chunks/worker.d.CyJRpyfZ.js';
|
|
13
|
+
import './chunks/environment.d.BFQtFKdZ.js';
|
|
14
14
|
import 'chai';
|
|
15
15
|
import 'vitest/optional-types.js';
|
|
16
16
|
import '@vitest/mocker';
|
|
17
|
-
import './chunks/source-map.d.
|
|
17
|
+
import './chunks/source-map.d.BkG8YK_3.js';
|
|
18
18
|
import 'vitest/browser';
|
|
19
19
|
import 'node:path';
|
|
20
20
|
import 'node:console';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/// <reference types="chai" />
|
|
2
|
-
import { a as File, A as Awaitable, h as TestAnnotation, j as TestArtifact, k as TaskResultPack, l as TaskEventPack, U as UserConsoleLog, m as SerializedRootConfig, L as LabelColor, M as ModuleGraphData, n as Test, o as TaskPopulated, E as ExpectStatic, p as ProvidedContext, q as MatcherState, r as SyncExpectationResult, t as AsyncExpectationResult, u as DomainSnapshotAdapter, v as ExpectationResult, w as Procedure, x as Mock, e as FakeTimersConfig, y as TemporalTimelike, z as spyOn, B as fn, C as MaybeMockedDeep, G as MaybeMocked, H as MaybePartiallyMocked, I as MaybePartiallyMockedDeep, J as MockInstance, R as RuntimeOptions, K as TestAPI, N as SuiteCollector, O as SuiteAPI, Q as Suite, W as SuiteHooks, V as VitestRunner, b as SerializedConfig, X as VitestRunnerImportSource, Y as Task, Z as CancelReason, $ as TestTryOptions, a0 as TestContext, a1 as ImportDuration, a2 as createChainable } from './chunks/config.d.
|
|
3
|
-
export { a3 as AfterSuiteRunMeta, a4 as Assertion, a5 as AsymmetricMatchersContaining, a6 as BaselineData, a7 as Bench, a8 as BenchFn, a9 as BenchFnOptions, aa as BenchFromSource, ab as BenchOptions, ac as BenchRegistration, ad as BenchRegistrationInput, ae as BenchResult, af as BenchRunOptions, ag as BenchStorage, ah as BenchmarkGroup, ai as BenchmarkProvider, aj as BrowserTraceArtifact, ak as DeeplyAllowMatchers, D as DiffOptions, al as DomainMatchResult, am as FailureScreenshotArtifact, an as JestAssertion, ao as Matcher, ap as Matchers, aq as MatchersObject, ar as MockContext, as as MockResult, at as MockResultIncomplete, au as MockResultReturn, av as MockResultThrow, aw as MockSettledResult, ax as MockSettledResultFulfilled, ay as MockSettledResultIncomplete, az as MockSettledResultRejected, aA as Mocked, aB as MockedClass, aC as MockedFunction, aD as MockedObject, aE as OnTestFailedHandler, aF as OnTestFinishedHandler, P as ParsedStack, aG as RunMode, aH as RunnerTaskBase, aI as RunnerTaskResult, aJ as RunnerTaskResultAttempt, aK as RuntimeConfig, S as SerializedCoverageConfig, aL as SerializedError, aM as SnapshotData, aN as SnapshotMatchOptions, aO as SnapshotResult, aP as SnapshotSerializer, aQ as SnapshotStateOptions, aR as SnapshotSummary, aS as SnapshotUpdateState, aT as SuiteFactory, aU as SuiteOptions, aV as TaskCustomOptions, aW as TaskMeta, aX as TaskState, aY as TestAnnotationArtifact, aZ as TestAnnotationLocation, a_ as TestArtifactBase, a$ as TestArtifactLocation, b0 as TestArtifactRegistry, b1 as TestAttachment, b2 as TestBenchmark, b3 as TestBenchmarkTask, T as TestError, b4 as TestFunction, b5 as TestOptions, g as TestTagDefinition, b6 as TestTags, b7 as UncheckedSnapshot, b8 as VisualRegressionArtifact, b9 as afterAll, ba as afterEach, bb as aroundAll, bc as aroundEach, bd as beforeAll, be as beforeEach, bf as onTestFailed, bg as onTestFinished } from './chunks/config.d.
|
|
4
|
-
import { M as ModuleDefinitionDurationsDiagnostic, U as UntrackedModuleDefinitionDiagnostic, S as SerializedTestSpecification, a as ModuleDefinitionDiagnostic, b as ModuleDefinitionLocation, c as SourceModuleDiagnostic, d as SourceModuleLocations } from './chunks/browser.d.
|
|
5
|
-
export { B as BrowserTesterOptions } from './chunks/browser.d.
|
|
6
|
-
import { c as createFileTask } from './chunks/task-utils.d.
|
|
7
|
-
import { B as BirpcReturn } from './chunks/worker.d.
|
|
8
|
-
export { C as ContextRPC, a as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.
|
|
2
|
+
import { a as File, A as Awaitable, h as TestAnnotation, j as TestArtifact, k as TaskResultPack, l as TaskEventPack, U as UserConsoleLog, m as SerializedRootConfig, L as LabelColor, M as ModuleGraphData, n as Test, o as TaskPopulated, E as ExpectStatic, p as ProvidedContext, q as MatcherState, r as SyncExpectationResult, t as AsyncExpectationResult, u as DomainSnapshotAdapter, v as ExpectationResult, w as Procedure, x as Mock, e as FakeTimersConfig, y as TemporalTimelike, z as spyOn, B as fn, C as MaybeMockedDeep, G as MaybeMocked, H as MaybePartiallyMocked, I as MaybePartiallyMockedDeep, J as MockInstance, R as RuntimeOptions, K as TestAPI, N as SuiteCollector, O as SuiteAPI, Q as Suite, W as SuiteHooks, V as VitestRunner, b as SerializedConfig, X as VitestRunnerImportSource, Y as Task, Z as CancelReason, $ as TestTryOptions, a0 as TestContext, a1 as ImportDuration, a2 as createChainable } from './chunks/config.d.B3YV4t0O.js';
|
|
3
|
+
export { a3 as AfterSuiteRunMeta, a4 as Assertion, a5 as AsymmetricMatchersContaining, a6 as BaselineData, a7 as Bench, a8 as BenchFn, a9 as BenchFnOptions, aa as BenchFromSource, ab as BenchOptions, ac as BenchRegistration, ad as BenchRegistrationInput, ae as BenchResult, af as BenchRunOptions, ag as BenchStorage, ah as BenchmarkGroup, ai as BenchmarkProvider, aj as BrowserTraceArtifact, ak as DeeplyAllowMatchers, D as DiffOptions, al as DomainMatchResult, am as FailureScreenshotArtifact, an as JestAssertion, ao as Matcher, ap as Matchers, aq as MatchersObject, ar as MockContext, as as MockResult, at as MockResultIncomplete, au as MockResultReturn, av as MockResultThrow, aw as MockSettledResult, ax as MockSettledResultFulfilled, ay as MockSettledResultIncomplete, az as MockSettledResultRejected, aA as Mocked, aB as MockedClass, aC as MockedFunction, aD as MockedObject, aE as OnTestFailedHandler, aF as OnTestFinishedHandler, P as ParsedStack, aG as RunMode, aH as RunnerTaskBase, aI as RunnerTaskResult, aJ as RunnerTaskResultAttempt, aK as RuntimeConfig, S as SerializedCoverageConfig, aL as SerializedError, aM as SnapshotData, aN as SnapshotMatchOptions, aO as SnapshotResult, aP as SnapshotSerializer, aQ as SnapshotStateOptions, aR as SnapshotSummary, aS as SnapshotUpdateState, aT as SuiteFactory, aU as SuiteOptions, aV as TaskCustomOptions, aW as TaskMeta, aX as TaskState, aY as TestAnnotationArtifact, aZ as TestAnnotationLocation, a_ as TestArtifactBase, a$ as TestArtifactLocation, b0 as TestArtifactRegistry, b1 as TestAttachment, b2 as TestBenchmark, b3 as TestBenchmarkTask, T as TestError, b4 as TestFunction, b5 as TestOptions, g as TestTagDefinition, b6 as TestTags, b7 as UncheckedSnapshot, b8 as VisualRegressionArtifact, b9 as afterAll, ba as afterEach, bb as aroundAll, bc as aroundEach, bd as beforeAll, be as beforeEach, bf as onTestFailed, bg as onTestFinished } from './chunks/config.d.B3YV4t0O.js';
|
|
4
|
+
import { M as ModuleDefinitionDurationsDiagnostic, U as UntrackedModuleDefinitionDiagnostic, S as SerializedTestSpecification, a as ModuleDefinitionDiagnostic, b as ModuleDefinitionLocation, c as SourceModuleDiagnostic, d as SourceModuleLocations } from './chunks/browser.d.C7tWgUvw.js';
|
|
5
|
+
export { B as BrowserTesterOptions } from './chunks/browser.d.C7tWgUvw.js';
|
|
6
|
+
import { c as createFileTask } from './chunks/task-utils.d.D-gFPNFi.js';
|
|
7
|
+
import { B as BirpcReturn } from './chunks/worker.d.CyJRpyfZ.js';
|
|
8
|
+
export { C as ContextRPC, a as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.CyJRpyfZ.js';
|
|
9
9
|
import { Disposable } from 'vitest/optional-runtime-types.js';
|
|
10
10
|
import { ModuleMockFactoryWithHelper, ModuleMockOptions } from '@vitest/mocker';
|
|
11
11
|
export { V as EvaluatedModules } from './chunks/evaluatedModules.d.BxJ5omdx.js';
|
|
12
|
-
import { T as Traces } from './chunks/rpc.d.
|
|
13
|
-
export { R as RunnerRPC, a as RuntimeRPC } from './chunks/rpc.d.
|
|
12
|
+
import { T as Traces } from './chunks/rpc.d.3FOhdFx8.js';
|
|
13
|
+
export { R as RunnerRPC, a as RuntimeRPC } from './chunks/rpc.d.3FOhdFx8.js';
|
|
14
14
|
export { ExpectTypeOf, expectTypeOf } from 'expect-type';
|
|
15
15
|
export { BenchOptions as BenchCompareOptions } from 'tinybench';
|
|
16
16
|
import * as chai from 'chai';
|
|
17
17
|
export { chai };
|
|
18
18
|
import 'vite/module-runner';
|
|
19
|
-
import './chunks/environment.d.
|
|
19
|
+
import './chunks/environment.d.BFQtFKdZ.js';
|
|
20
20
|
|
|
21
21
|
interface SourceMap {
|
|
22
22
|
file: string;
|
|
@@ -414,10 +414,14 @@ interface WaitForOptions {
|
|
|
414
414
|
* @default 1000ms
|
|
415
415
|
*/
|
|
416
416
|
timeout?: number;
|
|
417
|
+
/**
|
|
418
|
+
* @description Message that describes what is being waited for. It prefixes the error and names the trace step
|
|
419
|
+
*/
|
|
420
|
+
message?: string;
|
|
417
421
|
}
|
|
418
422
|
declare function waitFor<T>(callback: WaitForCallback<T>, options?: number | WaitForOptions): Promise<T>;
|
|
419
423
|
type WaitUntilCallback<T> = () => T | Promise<T>;
|
|
420
|
-
interface WaitUntilOptions extends Pick<WaitForOptions, "interval" | "timeout"> {}
|
|
424
|
+
interface WaitUntilOptions extends Pick<WaitForOptions, "interval" | "timeout" | "message"> {}
|
|
421
425
|
type Truthy<T> = T extends false | "" | 0 | null | undefined ? never : T;
|
|
422
426
|
declare function waitUntil<T>(callback: WaitUntilCallback<T>, options?: number | WaitUntilOptions): Promise<Truthy<T>>;
|
|
423
427
|
|
|
@@ -1030,7 +1034,8 @@ declare class TestRunner implements VitestRunner {
|
|
|
1030
1034
|
injectValue(key: string): any;
|
|
1031
1035
|
onBeforeRunTask(test: Task): Promise<void>;
|
|
1032
1036
|
onBeforeRunSuite(suite: Suite): Promise<void>;
|
|
1033
|
-
onBeforeTryTask(test: Task,
|
|
1037
|
+
onBeforeTryTask(test: Task, options: TestTryOptions): void;
|
|
1038
|
+
onAfterRetryTask(test: Test, _options: TestTryOptions): Promise<void>;
|
|
1034
1039
|
onAfterTryTask(test: Test): void;
|
|
1035
1040
|
extendTaskContext(context: TestContext): TestContext;
|
|
1036
1041
|
getImportDurations(): Record<string, ImportDuration>;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
export { S as Snapshots, T as TestRunner, a as assert, b as assertType, c as createExpect, g as expect, d as inject, s as should, v as vi, e as vitest } from './chunks/index.
|
|
2
|
-
export { V as EvaluatedModules } from './chunks/rpc.
|
|
3
|
-
export {
|
|
1
|
+
export { S as Snapshots, T as TestRunner, a as assert, b as assertType, c as createExpect, g as expect, d as inject, s as should, v as vi, e as vitest } from './chunks/index.CZzC1gGg.js';
|
|
2
|
+
export { V as EvaluatedModules } from './chunks/rpc.Uhkwr2NM.js';
|
|
3
|
+
export { k as afterAll, l as afterEach, n as aroundAll, o as aroundEach, q as beforeAll, t as beforeEach, u as describe, v as it, w as onTestFailed, x as onTestFinished, r as recordArtifact, y as suite, z as test } from './chunks/run.CjdgFZiW.js';
|
|
4
4
|
export { expectTypeOf } from 'expect-type';
|
|
5
5
|
import * as chai from 'chai';
|
|
6
6
|
export { chai };
|
|
7
7
|
import './chunks/utils.DYj33du9.js';
|
|
8
|
-
import './chunks/source-map.
|
|
8
|
+
import './chunks/source-map.DakdQc29.js';
|
|
9
9
|
import './chunks/index.D0heQG4v.js';
|
|
10
10
|
import './chunks/tinyrainbow.Do8I1XRG.js';
|
|
11
|
-
import './chunks/pathe.M-eThtNZ.
|
|
11
|
+
import './chunks/pathe.M-eThtNZ.zq3TM4NT.js';
|
|
12
12
|
import './chunks/spy.DDMXghXv.js';
|
|
13
13
|
import './chunks/display.BlTmubjj.js';
|
|
14
14
|
import './task-utils.js';
|
|
15
15
|
import './chunks/plugins.DPQHVT0p.js';
|
|
16
|
+
import './chunks/rawSnapshot.DqSiqIEx.js';
|
|
16
17
|
import './chunks/offset.Dy-5Fdfn.js';
|
|
17
18
|
import 'tinybench';
|
|
18
19
|
import 'vite/module-runner';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ModuleEvaluator, ModuleRunnerImportMeta, ModuleRunnerContext, EvaluatedModuleNode } from 'vite/module-runner';
|
|
2
|
-
import { G as GetterTracker } from './chunks/rpc.d.
|
|
2
|
+
import { G as GetterTracker } from './chunks/rpc.d.3FOhdFx8.js';
|
|
3
3
|
import { RuntimeRPC } from './index.js';
|
|
4
4
|
import { EvaluatedModules as VitestEvaluatedModules } from './index.js';
|
|
5
5
|
import vm from 'node:vm';
|
|
6
|
-
import './chunks/config.d.
|
|
6
|
+
import './chunks/config.d.B3YV4t0O.js';
|
|
7
7
|
import 'vitest/optional-runtime-types.js';
|
|
8
8
|
import 'tinybench';
|
|
9
9
|
|
package/dist/node.d.ts
CHANGED
|
@@ -3,31 +3,31 @@ import { UserConfig as UserConfig$1, ResolvedConfig as ResolvedConfig$1, Transfo
|
|
|
3
3
|
export { vite as Vite };
|
|
4
4
|
export { esbuildVersion, isCSSRequest, isFileLoadingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
5
5
|
import { IncomingMessage } from 'node:http';
|
|
6
|
-
import { R as ResolvedConfig, e as CliOptions, d as UserConfig, L as Logger, A as ApiConfig, P as PluginHarness, f as Vitest, g as ResolvedCoverageOptions, h as CoverageMap, i as TestSpecification, j as ReportContext, k as TestProject, l as VitestOptions, m as VitestRunMode, n as VCSProvider, o as VCSProviderOptions, p as PoolWorker, q as PoolOptions, r as WorkerRequest, s as TestSequencer } from './chunks/plugin.d.
|
|
7
|
-
export { M as AgentReporter, B as BaseCoverageOptions, t as BaseReporter, u as BenchmarkUserOptions, v as BrowserBuiltinProvider, w as BrowserCommand, x as BrowserCommandContext, y as BrowserConfigOptions, z as BrowserInstanceOption, D as BrowserModuleMocker, E as BrowserOrchestrator, G as BrowserProvider, H as BrowserProviderCloseOptions, J as BrowserProviderOption, K as BrowserScript, N as BrowserServerContribution, O as BrowserServerFactory, Q as BrowserServerState, S as BrowserServerStateSession, X as BrowserTraceViewOptions, Y as BuiltinEnvironment, Z as BuiltinReporterOptions, _ as BuiltinReporters, $ as CSSModuleScopeStrategy, a0 as CacheKeyIdGenerator, a1 as CacheKeyIdGeneratorContext, a2 as CachedTestFileResult, a3 as CoverageInstrumenter, a4 as CoverageIstanbulOptions, C as CoverageOptions, a5 as CoverageProvider, a6 as CoverageProviderModule, a7 as CoverageReporter, a8 as CoverageV8Options, a9 as CustomProviderOptions, aa as DefaultReporter, ab as DepsOptimizationOptions, ac as DotReporter, ad as EnvironmentOptions, ae as GithubActionsReporter, af as HTMLOptions, ag as HangingProcessReporter, I as InlineConfig, ah as InstrumenterOptions, ai as JUnitOptions, aj as JUnitReporter, ak as JsonAssertionResult, al as JsonOptions, am as JsonReporter, an as JsonTestResult, ao as JsonTestResults, M as MinimalReporter, ap as ModuleDependency, aq as ModuleDiagnostic, ar as ModulesResolver, as as OnServerRestartHandler, at as OnTestsRerunHandler, au as ParentProjectBrowser, av as Pool, aw as PoolRunnerInitializer, ax as PoolTask, ay as ProjectBrowser, az as ProjectConfig, aA as Report, aB as ReportedHookContext, aC as Reporter, aD as ReportersMap, aE as ResolveSnapshotPathHandler, aF as ResolveSnapshotPathHandlerContext, aG as ResolvedBrowserOptions, aH as ResolvedProjectConfig, aI as SerializedTestProject, aJ as SuiteNameTemplateVariables, aK as TapFlatReporter, aL as TapReporter, aM as TaskOptions, aN as TestAttempt, aO as TestAttemptState, aP as TestCase, aQ as TestCollection, aR as TestDiagnostic, aS as TestModule, aT as TestModuleState, aU as TestResult, aV as TestResultFailed, aW as TestResultPassed, aX as TestResultPending, aY as TestResultSkipped, aZ as TestRunEndReason, a_ as TestRunResult, a$ as TestSequencerConstructor, b0 as TestSpecificationOptions, b1 as TestState, b2 as TestSuite, b3 as TestSuiteState, b4 as ToMatchScreenshotComparators, b5 as ToMatchScreenshotOptions, b6 as TypecheckConfig, b7 as UIOptions, U as UserWorkspaceConfig, b8 as VerboseReporter, b9 as VitestEnvironment, ba as VitestPackageInstaller, V as VitestPluginContext, W as WatcherTriggerPattern, bb as WorkerResponse, bc as _BrowserNames, bd as experimental_getRunnerTask, be as startVitest } from './chunks/plugin.d.
|
|
6
|
+
import { R as ResolvedConfig, e as CliOptions, d as UserConfig, L as Logger, A as ApiConfig, P as PluginHarness, f as Vitest, g as ResolvedCoverageOptions, h as CoverageMap, i as TestSpecification, j as ReportContext, k as TestProject, l as VitestOptions, m as VitestRunMode, n as VCSProvider, o as VCSProviderOptions, p as PoolWorker, q as PoolOptions, r as WorkerRequest, s as TestSequencer } from './chunks/plugin.d.LRFSN46m.js';
|
|
7
|
+
export { M as AgentReporter, B as BaseCoverageOptions, t as BaseReporter, u as BenchmarkUserOptions, v as BrowserBuiltinProvider, w as BrowserCommand, x as BrowserCommandContext, y as BrowserConfigOptions, z as BrowserInstanceOption, D as BrowserModuleMocker, E as BrowserOrchestrator, G as BrowserProvider, H as BrowserProviderCloseOptions, J as BrowserProviderOption, K as BrowserScript, N as BrowserServerContribution, O as BrowserServerFactory, Q as BrowserServerState, S as BrowserServerStateSession, X as BrowserTraceViewOptions, Y as BuiltinEnvironment, Z as BuiltinReporterOptions, _ as BuiltinReporters, $ as CSSModuleScopeStrategy, a0 as CacheKeyIdGenerator, a1 as CacheKeyIdGeneratorContext, a2 as CachedTestFileResult, a3 as CoverageInstrumenter, a4 as CoverageIstanbulOptions, C as CoverageOptions, a5 as CoverageProvider, a6 as CoverageProviderModule, a7 as CoverageReporter, a8 as CoverageV8Options, a9 as CustomProviderOptions, aa as DefaultReporter, ab as DepsOptimizationOptions, ac as DotReporter, ad as EnvironmentOptions, ae as GithubActionsReporter, af as HTMLOptions, ag as HangingProcessReporter, I as InlineConfig, ah as InstrumenterOptions, ai as JUnitOptions, aj as JUnitReporter, ak as JsonAssertionResult, al as JsonOptions, am as JsonReporter, an as JsonTestResult, ao as JsonTestResults, M as MinimalReporter, ap as ModuleDependency, aq as ModuleDiagnostic, ar as ModulesResolver, as as OnServerRestartHandler, at as OnTestsRerunHandler, au as ParentProjectBrowser, av as Pool, aw as PoolRunnerInitializer, ax as PoolTask, ay as ProjectBrowser, az as ProjectConfig, aA as Report, aB as ReportedHookContext, aC as Reporter, aD as ReportersMap, aE as ResolveSnapshotPathHandler, aF as ResolveSnapshotPathHandlerContext, aG as ResolvedBrowserOptions, aH as ResolvedProjectConfig, aI as SerializedTestProject, aJ as SuiteNameTemplateVariables, aK as TapFlatReporter, aL as TapReporter, aM as TaskOptions, aN as TestAttempt, aO as TestAttemptState, aP as TestCase, aQ as TestCollection, aR as TestDiagnostic, aS as TestModule, aT as TestModuleState, aU as TestResult, aV as TestResultFailed, aW as TestResultPassed, aX as TestResultPending, aY as TestResultSkipped, aZ as TestRunEndReason, a_ as TestRunResult, a$ as TestSequencerConstructor, b0 as TestSpecificationOptions, b1 as TestState, b2 as TestSuite, b3 as TestSuiteState, b4 as ToMatchScreenshotComparators, b5 as ToMatchScreenshotOptions, b6 as TypecheckConfig, b7 as UIOptions, U as UserWorkspaceConfig, b8 as VerboseReporter, b9 as VitestEnvironment, ba as VitestPackageInstaller, V as VitestPluginContext, W as WatcherTriggerPattern, bb as WorkerResponse, bc as _BrowserNames, bd as experimental_getRunnerTask, be as startVitest } from './chunks/plugin.d.LRFSN46m.js';
|
|
8
8
|
import { EventEmitter } from 'events';
|
|
9
|
-
import { A as Awaitable } from './chunks/config.d.
|
|
9
|
+
import { A as Awaitable } from './chunks/config.d.B3YV4t0O.js';
|
|
10
10
|
import { AfterSuiteRunMeta } from './index.js';
|
|
11
|
-
export { Y as RunnerTask, aI as RunnerTaskResult, k as RunnerTaskResultPack, n as RunnerTestCase, a as RunnerTestFile, Q as RunnerTestSuite, aK as RuntimeConfig, bh as SequenceHooks, bi as SequenceSetupFiles, aL as SerializedError, bj as disableDefaultColors } from './chunks/config.d.
|
|
11
|
+
export { Y as RunnerTask, aI as RunnerTaskResult, k as RunnerTaskResultPack, n as RunnerTestCase, a as RunnerTestFile, Q as RunnerTestSuite, aK as RuntimeConfig, bh as SequenceHooks, bi as SequenceSetupFiles, aL as SerializedError, bj as disableDefaultColors } from './chunks/config.d.B3YV4t0O.js';
|
|
12
12
|
import { RuntimeRPC } from './index.js';
|
|
13
13
|
import { Writable } from 'node:stream';
|
|
14
14
|
import { ContextRPC } from './index.js';
|
|
15
|
-
export { T as TestExecutionType } from './chunks/worker.d.
|
|
15
|
+
export { T as TestExecutionType } from './chunks/worker.d.CyJRpyfZ.js';
|
|
16
16
|
import { Debugger } from 'obug';
|
|
17
|
-
export { g as generateFileHash } from './chunks/task-utils.d.
|
|
17
|
+
export { g as generateFileHash } from './chunks/task-utils.d.D-gFPNFi.js';
|
|
18
18
|
export { CDPSession } from 'vitest/browser';
|
|
19
|
-
import './chunks/browser.d.
|
|
19
|
+
import './chunks/browser.d.C7tWgUvw.js';
|
|
20
20
|
import 'chai';
|
|
21
21
|
import 'vitest/optional-types.js';
|
|
22
22
|
import '@vitest/mocker';
|
|
23
|
-
import './chunks/source-map.d.
|
|
23
|
+
import './chunks/source-map.d.BkG8YK_3.js';
|
|
24
24
|
import 'node:path';
|
|
25
25
|
import 'node:console';
|
|
26
26
|
import 'node:fs/promises';
|
|
27
27
|
import 'vitest/optional-runtime-types.js';
|
|
28
28
|
import 'tinybench';
|
|
29
29
|
import 'vite/module-runner';
|
|
30
|
-
import './chunks/environment.d.
|
|
30
|
+
import './chunks/environment.d.BFQtFKdZ.js';
|
|
31
31
|
|
|
32
32
|
declare function escapeTestName(label: string, dynamic: boolean): string;
|
|
33
33
|
|
|
@@ -249,7 +249,7 @@ declare function parseCLI(argv: string | string[], config?: CliParseOptions): {
|
|
|
249
249
|
};
|
|
250
250
|
|
|
251
251
|
declare function resolveApiServerConfig(config: UserConfig, defaultPort: number, logger: Logger): ApiConfig;
|
|
252
|
-
declare function resolveConfig(options?: UserConfig, viteOverrides?: UserConfig$1, pluginsHarness?: PluginHarness): Promise<ResolvedConfig$1>;
|
|
252
|
+
declare function resolveConfig(options?: UserConfig, viteOverrides?: UserConfig$1, pluginsHarness?: PluginHarness, cliFilters?: string[]): Promise<ResolvedConfig$1>;
|
|
253
253
|
|
|
254
254
|
type Threshold = "lines" | "functions" | "statements" | "branches";
|
|
255
255
|
interface ResolvedThreshold {
|
package/dist/node.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
export { esbuildVersion, isCSSRequest, isFileLoadingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
3
|
-
import { V as Vitest } from './chunks/cli-api.
|
|
4
|
-
export { M as AgentReporter, B as BaseCoverageProvider, D as DefaultReporter, a as DotReporter, G as GitVCSProvider, b as GithubActionsReporter, H as HangingProcessReporter, J as JUnitReporter, c as JsonReporter, M as MinimalReporter, d as MtimeVCSProvider, R as ReportersMap, T as TapFlatReporter, e as TapReporter, f as VerboseReporter, g as createVitest, h as experimental_getRunnerTask, i as isValidApiRequest, r as registerConsoleShortcuts, s as startVitest } from './chunks/cli-api.
|
|
5
|
-
export { B as BaseSequencer, a as BrowserConnectionError, F as ForksPoolWorker, G as GitNotFoundError, L as Logger, P as PluginHarness, b as TestsNotFoundError, T as ThreadsPoolWorker, c as TypecheckPoolWorker, V as VitestPackageInstaller, d as VmForksPoolWorker, e as VmThreadsPoolWorker, f as createDebugger, g as createMethodsRPC, h as createViteLogger, i as escapeTestName, j as getFilePoolName, k as isFileServingAllowed, r as resolveApiServerConfig, l as resolveConfig, m as resolveFsAllow } from './chunks/index.
|
|
6
|
-
export { c as createCLI, p as parseCLI } from './chunks/cac.
|
|
3
|
+
import { V as Vitest } from './chunks/cli-api.COfZo8lK.js';
|
|
4
|
+
export { M as AgentReporter, B as BaseCoverageProvider, D as DefaultReporter, a as DotReporter, G as GitVCSProvider, b as GithubActionsReporter, H as HangingProcessReporter, J as JUnitReporter, c as JsonReporter, M as MinimalReporter, d as MtimeVCSProvider, R as ReportersMap, T as TapFlatReporter, e as TapReporter, f as VerboseReporter, g as createVitest, h as experimental_getRunnerTask, i as isValidApiRequest, r as registerConsoleShortcuts, s as startVitest } from './chunks/cli-api.COfZo8lK.js';
|
|
5
|
+
export { B as BaseSequencer, a as BrowserConnectionError, F as ForksPoolWorker, G as GitNotFoundError, L as Logger, P as PluginHarness, b as TestsNotFoundError, T as ThreadsPoolWorker, c as TypecheckPoolWorker, V as VitestPackageInstaller, d as VmForksPoolWorker, e as VmThreadsPoolWorker, f as createDebugger, g as createMethodsRPC, h as createViteLogger, i as escapeTestName, j as getFilePoolName, k as isFileServingAllowed, r as resolveApiServerConfig, l as resolveConfig, m as resolveFsAllow } from './chunks/index.Di8au7q4.js';
|
|
6
|
+
export { c as createCLI, p as parseCLI } from './chunks/cac.BYbt0aJp.js';
|
|
7
7
|
export { distDir, rootDir } from './path.js';
|
|
8
8
|
export { generateFileHash } from './task-utils.js';
|
|
9
9
|
export { w as disableDefaultColors } from './chunks/tinyrainbow.Do8I1XRG.js';
|
|
10
10
|
import 'node:fs';
|
|
11
|
-
import './chunks/coverage.
|
|
12
|
-
import './chunks/pathe.M-eThtNZ.
|
|
11
|
+
import './chunks/coverage.jGCktcGP.js';
|
|
12
|
+
import './chunks/pathe.M-eThtNZ.zq3TM4NT.js';
|
|
13
13
|
import 'node:fs/promises';
|
|
14
14
|
import 'node:os';
|
|
15
|
-
import './chunks/source-map.
|
|
15
|
+
import './chunks/source-map.DakdQc29.js';
|
|
16
16
|
import './chunks/index.D0heQG4v.js';
|
|
17
17
|
import 'node:perf_hooks';
|
|
18
18
|
import './chunks/index.DmDMHCg8.js';
|
|
@@ -31,9 +31,9 @@ import './chunks/constants.DLYM6cZY.js';
|
|
|
31
31
|
import './chunks/modules.BJuCwlRJ.js';
|
|
32
32
|
import 'node:module';
|
|
33
33
|
import 'node:crypto';
|
|
34
|
-
import './chunks/run.
|
|
34
|
+
import './chunks/run.CjdgFZiW.js';
|
|
35
35
|
import './chunks/display.BlTmubjj.js';
|
|
36
|
-
import './chunks/nativeModuleRunner.
|
|
36
|
+
import './chunks/nativeModuleRunner.9xPIMzi7.js';
|
|
37
37
|
import 'node:url';
|
|
38
38
|
import 'node:path';
|
|
39
39
|
import 'node:process';
|
|
@@ -42,24 +42,26 @@ import 'node:v8';
|
|
|
42
42
|
import 'node:util';
|
|
43
43
|
import 'vite/module-runner';
|
|
44
44
|
import './traces.js';
|
|
45
|
+
import './chunks/utils.BBk_icFG.js';
|
|
45
46
|
import 'picomatch';
|
|
46
47
|
import 'tinyglobby';
|
|
47
48
|
import './chunks/defaults.B1FCaFfh.js';
|
|
48
49
|
import './chunks/env.BKKtU2WC.js';
|
|
49
50
|
import 'std-env';
|
|
50
|
-
import './chunks/utils.DSfl_w8V.js';
|
|
51
51
|
import 'tinyexec';
|
|
52
52
|
import 'node:readline';
|
|
53
|
+
import './chunks/rawSnapshot.DqSiqIEx.js';
|
|
54
|
+
import './chunks/offset.Dy-5Fdfn.js';
|
|
55
|
+
import './chunks/plugins.DPQHVT0p.js';
|
|
53
56
|
import 'magic-string';
|
|
54
57
|
import '@vitest/mocker/node';
|
|
55
58
|
import 'node:console';
|
|
56
59
|
import 'node:stream';
|
|
57
60
|
import 'obug';
|
|
58
|
-
import './chunks/resolver.
|
|
61
|
+
import './chunks/resolver.BzpmeQeT.js';
|
|
59
62
|
import 'es-module-lexer';
|
|
60
|
-
import './chunks/offset.Dy-5Fdfn.js';
|
|
61
63
|
import '#module-evaluator';
|
|
62
|
-
import './chunks/module-dependencies.
|
|
64
|
+
import './chunks/module-dependencies._2Eei3FO.js';
|
|
63
65
|
import 'node:tty';
|
|
64
66
|
import 'node:events';
|
|
65
67
|
import 'node:child_process';
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as Environment } from './chunks/environment.d.
|
|
2
|
-
export { a as EnvironmentReturn, V as VmEnvironmentReturn } from './chunks/environment.d.
|
|
3
|
-
import {
|
|
4
|
-
export { b as SerializedConfig, V as VitestRunner } from './chunks/config.d.
|
|
1
|
+
import { E as Environment } from './chunks/environment.d.BFQtFKdZ.js';
|
|
2
|
+
export { a as EnvironmentReturn, V as VmEnvironmentReturn } from './chunks/environment.d.BFQtFKdZ.js';
|
|
3
|
+
import { bu as SnapshotEnvironment, bv as SnapshotEnvironmentOptions } from './chunks/config.d.B3YV4t0O.js';
|
|
4
|
+
export { b as SerializedConfig, V as VitestRunner } from './chunks/config.d.B3YV4t0O.js';
|
|
5
5
|
import 'vitest/optional-runtime-types.js';
|
|
6
6
|
import 'tinybench';
|
|
7
7
|
|
package/dist/runtime.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { VitestModuleEvaluator } from './module-evaluator.js';
|
|
2
|
-
import { V as VITEST_VM_CONTEXT_SYMBOL, s as startVitestModuleRunner, a as VitestModuleRunner } from './chunks/index.
|
|
3
|
-
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.
|
|
2
|
+
import { V as VITEST_VM_CONTEXT_SYMBOL, s as startVitestModuleRunner, a as VitestModuleRunner } from './chunks/index.Bi0NXYPf.js';
|
|
3
|
+
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.Bi0NXYPf.js';
|
|
4
4
|
import { g as getWorkerState } from './chunks/utils.DYj33du9.js';
|
|
5
|
-
export { VitestNodeSnapshotEnvironment as VitestSnapshotEnvironment } from './chunks/node.
|
|
5
|
+
export { VitestNodeSnapshotEnvironment as VitestSnapshotEnvironment } from './chunks/node.B9mkVmLH.js';
|
|
6
6
|
import 'node:module';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:vm';
|
|
9
9
|
import 'vite/module-runner';
|
|
10
10
|
import './traces.js';
|
|
11
11
|
import 'node:fs';
|
|
12
|
-
import './chunks/pathe.M-eThtNZ.
|
|
12
|
+
import './chunks/pathe.M-eThtNZ.zq3TM4NT.js';
|
|
13
13
|
import './chunks/modules.BJuCwlRJ.js';
|
|
14
14
|
import './path.js';
|
|
15
15
|
import 'node:path';
|
package/dist/task-utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as toArray, a as relative } from './chunks/pathe.M-eThtNZ.
|
|
1
|
+
import { t as toArray, a as relative } from './chunks/pathe.M-eThtNZ.zq3TM4NT.js';
|
|
2
2
|
|
|
3
3
|
/* @__NO_SIDE_EFFECTS__ */
|
|
4
4
|
function isTestCase(s) {
|
|
@@ -52,9 +52,13 @@ function createTaskName(names, separator = " > ") {
|
|
|
52
52
|
return names.filter((name) => name !== void 0).join(separator);
|
|
53
53
|
}
|
|
54
54
|
/* @__NO_SIDE_EFFECTS__ */
|
|
55
|
+
function isSnapshotMatchError(error) {
|
|
56
|
+
return typeof error?.message === "string" && /Snapshot .* mismatched/.test(error.message);
|
|
57
|
+
}
|
|
58
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
55
59
|
function hasFailedSnapshot(suite) {
|
|
56
60
|
return (/* @__PURE__ */ getTests(suite)).some((s) => {
|
|
57
|
-
return s.result?.errors?.some(
|
|
61
|
+
return s.result?.errors?.some(isSnapshotMatchError);
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -283,4 +287,4 @@ function checkAllowOnly(task, allowOnly) {
|
|
|
283
287
|
};
|
|
284
288
|
}
|
|
285
289
|
|
|
286
|
-
export { calculateSuiteHash, convertTasksToEvents, createFileTask, createTaskName, generateFileHash, generateHash, getFullName, getNames, getSuites, getTasks, getTestName, getTests, hasFailed, hasFailedSnapshot, interpretTaskModes, isTestCase };
|
|
290
|
+
export { calculateSuiteHash, convertTasksToEvents, createFileTask, createTaskName, generateFileHash, generateHash, getFullName, getNames, getSuites, getTasks, getTestName, getTests, hasFailed, hasFailedSnapshot, interpretTaskModes, isSnapshotMatchError, isTestCase };
|
package/dist/worker.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as WorkerSetupContext, e as BirpcOptions } from './chunks/worker.d.
|
|
1
|
+
import { d as WorkerSetupContext, e as BirpcOptions } from './chunks/worker.d.CyJRpyfZ.js';
|
|
2
2
|
import { WorkerGlobalState } from './index.js';
|
|
3
|
-
import { T as Traces } from './chunks/rpc.d.
|
|
3
|
+
import { T as Traces } from './chunks/rpc.d.3FOhdFx8.js';
|
|
4
4
|
import { RuntimeRPC } from './index.js';
|
|
5
|
-
import { A as Awaitable } from './chunks/config.d.
|
|
5
|
+
import { A as Awaitable } from './chunks/config.d.B3YV4t0O.js';
|
|
6
6
|
import { ModuleRunner } from 'vite/module-runner';
|
|
7
|
-
import './chunks/environment.d.
|
|
7
|
+
import './chunks/environment.d.BFQtFKdZ.js';
|
|
8
8
|
import 'vitest/optional-runtime-types.js';
|
|
9
9
|
import 'tinybench';
|
|
10
10
|
|
package/dist/worker.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
export { r as runBaseTests, s as setupEnvironment } from './chunks/base.
|
|
2
|
-
export { i as init } from './chunks/init.
|
|
1
|
+
export { r as runBaseTests, s as setupEnvironment } from './chunks/base.Cof-UHJf.js';
|
|
2
|
+
export { i as init } from './chunks/init.CO4AB7HZ.js';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import './chunks/spy.DDMXghXv.js';
|
|
5
|
-
import './chunks/index.
|
|
5
|
+
import './chunks/index.w_oBZ9N8.js';
|
|
6
6
|
import 'chai';
|
|
7
7
|
import 'node:async_hooks';
|
|
8
|
-
import './chunks/coverage
|
|
9
|
-
import './chunks/coverage.
|
|
10
|
-
import './chunks/pathe.M-eThtNZ.
|
|
11
|
-
import './chunks/rpc.
|
|
8
|
+
import './chunks/coverage.9iqXE2gN.js';
|
|
9
|
+
import './chunks/coverage.jGCktcGP.js';
|
|
10
|
+
import './chunks/pathe.M-eThtNZ.zq3TM4NT.js';
|
|
11
|
+
import './chunks/rpc.Uhkwr2NM.js';
|
|
12
12
|
import 'vite/module-runner';
|
|
13
|
-
import './chunks/source-map.
|
|
13
|
+
import './chunks/source-map.DakdQc29.js';
|
|
14
14
|
import './chunks/index.D0heQG4v.js';
|
|
15
15
|
import './chunks/tinyrainbow.Do8I1XRG.js';
|
|
16
16
|
import './chunks/index.DmDMHCg8.js';
|
|
17
17
|
import './chunks/utils.DYj33du9.js';
|
|
18
|
-
import './chunks/setup-common.
|
|
18
|
+
import './chunks/setup-common.CqAQCXzx.js';
|
|
19
19
|
import './chunks/plugins.DPQHVT0p.js';
|
|
20
|
-
import './chunks/index.
|
|
21
|
-
import './chunks/run.
|
|
20
|
+
import './chunks/index.CZzC1gGg.js';
|
|
21
|
+
import './chunks/run.CjdgFZiW.js';
|
|
22
22
|
import './chunks/display.BlTmubjj.js';
|
|
23
23
|
import './task-utils.js';
|
|
24
|
+
import './chunks/rawSnapshot.DqSiqIEx.js';
|
|
24
25
|
import './chunks/offset.Dy-5Fdfn.js';
|
|
25
26
|
import 'tinybench';
|
|
26
27
|
import 'expect-type';
|
|
27
|
-
import './chunks/module-dependencies.
|
|
28
|
+
import './chunks/module-dependencies._2Eei3FO.js';
|
|
28
29
|
import 'node:module';
|
|
29
30
|
import 'node:url';
|
|
30
31
|
import './path.js';
|
|
31
32
|
import 'node:path';
|
|
32
33
|
import './traces.js';
|
|
33
|
-
import './chunks/index.
|
|
34
|
+
import './chunks/index.Bi0NXYPf.js';
|
|
34
35
|
import 'node:fs';
|
|
35
36
|
import './chunks/modules.BJuCwlRJ.js';
|
|
36
37
|
import './module-evaluator.js';
|