vitest 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +11 -11
- package/dist/chunks/{base.DhkQeZwd.js → base.CYbb9pQW.js} +39 -15
- package/dist/chunks/{browser.d.3cffPS1V.d.ts → browser.d.FGQ9_rK6.d.ts} +3 -3
- package/dist/chunks/{cac.DfDGTQ9W.js → cac.DTXWs6Ni.js} +21 -23
- package/dist/chunks/cli-api.Bx28WXzL.js +13879 -0
- package/dist/chunks/{config.d.BxjInJat.d.ts → config.d.QBNYCgFU.d.ts} +20 -9
- package/dist/chunks/{console.RBA5x-0t.js → console.DtI4yxfN.js} +5 -5
- package/dist/chunks/{coverage.S6Dao4g-.js → coverage.-bm5IxnW.js} +1 -1
- package/dist/chunks/{coverage._yXj5zeb.js → coverage.cTDc4uSS.js} +1 -1
- package/dist/chunks/{creator.203NYCo3.js → creator.CLL8QFMS.js} +43 -53
- package/dist/chunks/{defaults.D2ip7f-X.js → defaults.B1FCaFfh.js} +2 -2
- package/dist/chunks/{display.CXBnkt9a.js → display.BlTmubjj.js} +1 -1
- package/dist/chunks/{doctor.CpHPRoza.js → doctor.Bqc8NDDb.js} +40 -41
- package/dist/chunks/{env.DzFJjrmK.js → env.BKKtU2WC.js} +1 -1
- package/dist/chunks/{environment.d.DAj1Vt__.d.ts → environment.d.BY56MoGs.d.ts} +1 -1
- package/dist/chunks/{globals.9QtHn8Sr.js → globals.CTWMSIPL.js} +10 -10
- package/dist/chunks/{index.DpLw24bj.js → index.B8VfM7Mf.js} +6233 -18539
- package/dist/chunks/{index.DXQx-kDM.js → index.BoyTG_B7.js} +9 -4
- package/dist/chunks/{index.k8L_ZRzq.js → index.CPNMO3h-.js} +54 -46
- package/dist/chunks/{index.cx-_w29y.js → index.D0heQG4v.js} +5 -3
- package/dist/chunks/{index.ggMXe2IF.js → index.GYMZ12wH.js} +5 -5
- package/dist/chunks/{index.C4tKZ0yW.js → index.uwTEEBsB.js} +88 -68
- package/dist/chunks/{init-forks.hzLs7kMZ.js → init-forks.CbYYa5xq.js} +1 -1
- package/dist/chunks/{init-threads.COb0VD5D.js → init-threads.DtjdvxPl.js} +1 -1
- package/dist/chunks/{init.D0qF-GGk.js → init.DrHtV5zd.js} +7 -6
- package/dist/chunks/module-dependencies.CwNPkcV4.js +71 -0
- package/dist/chunks/{native.CBlba4VV.js → native.cdzHIdmv.js} +47 -33
- package/dist/chunks/{nativeModuleMocker.CXSh3m91.js → nativeModuleMocker.D8f4cW4A.js} +2 -2
- package/dist/chunks/{nativeModuleRunner.jwZPY3dg.js → nativeModuleRunner.xi64Afb2.js} +1 -1
- package/dist/chunks/{node.BzimPqT5.js → node.uQulW0ei.js} +1 -1
- package/dist/chunks/{pathe.M-eThtNZ.CknpM8Or.js → pathe.M-eThtNZ.Ba-7h1rE.js} +8 -6
- package/dist/chunks/{plugin.d.BsjqSb4-.d.ts → plugin.d.C8mmycim.d.ts} +88 -53
- package/dist/chunks/{plugins.D2ut1V9b.js → plugins.DPQHVT0p.js} +1 -1
- package/dist/chunks/{resolver.fbW9AUvG.js → resolver.CtCcxIy1.js} +1 -1
- package/dist/chunks/{rpc.BTmCtPly.js → rpc.DpkUyY1N.js} +2 -2
- package/dist/chunks/{rpc.d.BPFHl-HE.d.ts → rpc.d.Cft1biqy.d.ts} +2 -1
- package/dist/chunks/{run.BTlFXlnv.js → run.Cm2sd7-x.js} +97 -82
- package/dist/chunks/{setup-common.BglbuAHD.js → setup-common.BABL3z3m.js} +3 -3
- package/dist/chunks/{source-map.DUxvo12T.js → source-map.DdKI5IHB.js} +13 -4
- package/dist/chunks/{source-map.d.BLHtC2OB.d.ts → source-map.d.kzFtk_dj.d.ts} +1 -1
- package/dist/chunks/{spy.DgMTfhrK.js → spy.DDMXghXv.js} +45 -16
- package/dist/chunks/{task-utils.d.C-IeGxLU.d.ts → task-utils.d.PFh2BV6Q.d.ts} +1 -1
- package/dist/chunks/tinyrainbow.Do8I1XRG.js +88 -0
- package/dist/chunks/{utils.RcGwuOc_.js → utils.DSfl_w8V.js} +44 -42
- package/dist/chunks/{vm.vTyZj_02.js → vm.Uo_C9Uld.js} +14 -11
- package/dist/chunks/{worker.d.Bt2A2mmi.d.ts → worker.d.BH-r1bPu.d.ts} +8 -3
- package/dist/cli.js +4 -4
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +9 -10
- package/dist/config.js +2 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +10 -10
- package/dist/module-evaluator.d.ts +2 -2
- package/dist/node.d.ts +9 -10
- package/dist/node.js +26 -25
- package/dist/runtime.d.ts +4 -4
- package/dist/runtime.js +4 -4
- package/dist/spy.js +1 -1
- package/dist/task-utils.js +6 -4
- package/dist/worker.d.ts +4 -4
- package/dist/worker.js +21 -20
- package/dist/workers/forks.js +19 -18
- package/dist/workers/runVmTests.js +23 -14
- package/dist/workers/threads.js +19 -18
- package/dist/workers/vmForks.js +13 -13
- package/dist/workers/vmThreads.js +13 -13
- package/package.json +28 -27
- package/dist/chunks/cli-api.C4x4GGip.js +0 -528
- package/dist/chunks/tinyrainbow.Ht9iggcq.js +0 -95
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stripVTControlCharacters } from 'node:util';
|
|
2
|
-
import { t as truncateString$1 } from './display.
|
|
3
|
-
import { i as isAbsolute, a as relative, d as dirname, b as basename, s as slash } from './pathe.M-eThtNZ.
|
|
4
|
-
import {
|
|
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.Ba-7h1rE.js';
|
|
4
|
+
import { $ } from './tinyrainbow.Do8I1XRG.js';
|
|
5
5
|
|
|
6
6
|
const F_RIGHT = "→";
|
|
7
7
|
const F_DOWN = "↓";
|
|
@@ -15,20 +15,20 @@ const F_TODO = "□";
|
|
|
15
15
|
const F_TREE_NODE_MIDDLE = "├──";
|
|
16
16
|
const F_TREE_NODE_END = "└──";
|
|
17
17
|
|
|
18
|
-
const pointer =
|
|
19
|
-
const skipped =
|
|
20
|
-
const todo =
|
|
21
|
-
const benchmarkPass =
|
|
22
|
-
const testPass =
|
|
23
|
-
const taskFail =
|
|
24
|
-
const suiteFail =
|
|
25
|
-
const pending =
|
|
26
|
-
const separator =
|
|
18
|
+
const pointer = $.yellow(F_POINTER);
|
|
19
|
+
const skipped = $.dim($.gray(F_DOWN));
|
|
20
|
+
const todo = $.dim($.gray(F_TODO));
|
|
21
|
+
const benchmarkPass = $.green(F_DOT);
|
|
22
|
+
const testPass = $.green(F_CHECK);
|
|
23
|
+
const taskFail = $.red(F_CROSS);
|
|
24
|
+
const suiteFail = $.red(F_POINTER);
|
|
25
|
+
const pending = $.gray("·");
|
|
26
|
+
const separator = $.dim(" > ");
|
|
27
27
|
const labelDefaultColors = [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
$.bgYellow,
|
|
29
|
+
$.bgCyan,
|
|
30
|
+
$.bgGreen,
|
|
31
|
+
$.bgMagenta
|
|
32
32
|
];
|
|
33
33
|
function getCols(delta = 0) {
|
|
34
34
|
let length = process.stdout?.columns;
|
|
@@ -36,7 +36,7 @@ function getCols(delta = 0) {
|
|
|
36
36
|
return Math.max(length + delta, 0);
|
|
37
37
|
}
|
|
38
38
|
function errorBanner(message) {
|
|
39
|
-
return divider(
|
|
39
|
+
return divider($.bold($.bgRed(` ${message} `)), null, null, $.red);
|
|
40
40
|
}
|
|
41
41
|
function divider(text, left, right, color) {
|
|
42
42
|
const cols = getCols();
|
|
@@ -59,28 +59,30 @@ function formatTestPath(root, path) {
|
|
|
59
59
|
const dir = dirname(path);
|
|
60
60
|
const ext = path.match(/(\.(spec|test)\.[cm]?[tj]sx?)$/)?.[0] || "";
|
|
61
61
|
const base = basename(path, ext);
|
|
62
|
-
return slash(
|
|
62
|
+
return slash($.dim(`${dir}/`) + $.bold(base)) + $.dim(ext);
|
|
63
63
|
}
|
|
64
64
|
function renderSnapshotSummary(rootDir, snapshots) {
|
|
65
65
|
const summary = [];
|
|
66
|
-
if (snapshots.added) summary.push(
|
|
67
|
-
if (snapshots.unmatched) summary.push(
|
|
68
|
-
if (snapshots.updated) summary.push(
|
|
69
|
-
if (snapshots.filesRemoved)
|
|
70
|
-
|
|
66
|
+
if (snapshots.added) summary.push($.bold($.green(`${snapshots.added} written`)));
|
|
67
|
+
if (snapshots.unmatched) summary.push($.bold($.red(`${snapshots.unmatched} failed`)));
|
|
68
|
+
if (snapshots.updated) summary.push($.bold($.green(`${snapshots.updated} updated `)));
|
|
69
|
+
if (snapshots.filesRemoved) {
|
|
70
|
+
if (snapshots.didUpdate) summary.push($.bold($.green(`${snapshots.filesRemoved} files removed `)));
|
|
71
|
+
else summary.push($.bold($.yellow(`${snapshots.filesRemoved} files obsolete `)));
|
|
72
|
+
}
|
|
71
73
|
if (snapshots.filesRemovedList && snapshots.filesRemovedList.length) {
|
|
72
74
|
const [head, ...tail] = snapshots.filesRemovedList;
|
|
73
|
-
summary.push(`${
|
|
75
|
+
summary.push(`${$.gray(F_DOWN_RIGHT)} ${formatTestPath(rootDir, head)}`);
|
|
74
76
|
tail.forEach((key) => {
|
|
75
|
-
summary.push(` ${
|
|
77
|
+
summary.push(` ${$.gray(F_DOT)} ${formatTestPath(rootDir, key)}`);
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
if (snapshots.unchecked) {
|
|
79
|
-
if (snapshots.didUpdate) summary.push(
|
|
80
|
-
else summary.push(
|
|
81
|
+
if (snapshots.didUpdate) summary.push($.bold($.green(`${snapshots.unchecked} removed`)));
|
|
82
|
+
else summary.push($.bold($.yellow(`${snapshots.unchecked} obsolete`)));
|
|
81
83
|
snapshots.uncheckedKeysByFile.forEach((uncheckedFile) => {
|
|
82
|
-
summary.push(`${
|
|
83
|
-
uncheckedFile.keys.forEach((key) => summary.push(` ${
|
|
84
|
+
summary.push(`${$.gray(F_DOWN_RIGHT)} ${formatTestPath(rootDir, uncheckedFile.filePath)}`);
|
|
85
|
+
uncheckedFile.keys.forEach((key) => summary.push(` ${$.gray(F_DOT)} ${key}`));
|
|
84
86
|
});
|
|
85
87
|
}
|
|
86
88
|
return summary;
|
|
@@ -89,7 +91,7 @@ function countTestErrors(tasks) {
|
|
|
89
91
|
return tasks.reduce((c, i) => c + (i.result?.errors?.length || 0), 0);
|
|
90
92
|
}
|
|
91
93
|
function getStateString(tasks, name = "tests", showTotal = true) {
|
|
92
|
-
if (tasks.length === 0) return
|
|
94
|
+
if (tasks.length === 0) return $.dim(`no ${name}`);
|
|
93
95
|
const passed = tasks.reduce((acc, i) => {
|
|
94
96
|
// Exclude expected failures from passed count
|
|
95
97
|
if (i.result?.state === "pass" && i.type === "test" && i.fails) return acc;
|
|
@@ -104,12 +106,12 @@ function getStateString(tasks, name = "tests", showTotal = true) {
|
|
|
104
106
|
return acc;
|
|
105
107
|
}, 0);
|
|
106
108
|
return [
|
|
107
|
-
failed ?
|
|
108
|
-
passed ?
|
|
109
|
-
expectedFail ?
|
|
110
|
-
skipped ?
|
|
111
|
-
todo ?
|
|
112
|
-
].filter(Boolean).join(
|
|
109
|
+
failed ? $.bold($.red(`${failed} failed`)) : null,
|
|
110
|
+
passed ? $.bold($.green(`${passed} passed`)) : null,
|
|
111
|
+
expectedFail ? $.cyan(`${expectedFail} expected fail`) : null,
|
|
112
|
+
skipped ? $.yellow(`${skipped} skipped`) : null,
|
|
113
|
+
todo ? $.gray(`${todo} todo`) : null
|
|
114
|
+
].filter(Boolean).join($.dim(" | ")) + (showTotal ? $.gray(` (${tasks.length})`) : "");
|
|
113
115
|
}
|
|
114
116
|
function getStateSymbol(task) {
|
|
115
117
|
if (task.mode === "todo") return todo;
|
|
@@ -131,20 +133,20 @@ function formatTime(time) {
|
|
|
131
133
|
}
|
|
132
134
|
function formatProjectName(project, suffix = " ") {
|
|
133
135
|
if (!project?.name) return "";
|
|
134
|
-
if (
|
|
135
|
-
let background = project.color &&
|
|
136
|
+
if (!$.isColorSupported) return `|${project.name}|${suffix}`;
|
|
137
|
+
let background = project.color && $[`bg${capitalize(project.color)}`];
|
|
136
138
|
if (!background) {
|
|
137
139
|
const index = project.name.split("").reduce((acc, v, idx) => acc + v.charCodeAt(0) + idx, 0);
|
|
138
140
|
background = labelDefaultColors[index % labelDefaultColors.length];
|
|
139
141
|
}
|
|
140
|
-
return
|
|
142
|
+
return $.black(background(` ${project.name} `)) + suffix;
|
|
141
143
|
}
|
|
142
144
|
function withLabel(color, label, message) {
|
|
143
145
|
const bgColor = `bg${color.charAt(0).toUpperCase()}${color.slice(1)}`;
|
|
144
|
-
return `${
|
|
146
|
+
return `${$.bold($.black($[bgColor](` ${label} `)))} ${message ? $[color](message) : ""}`;
|
|
145
147
|
}
|
|
146
148
|
function padSummaryTitle(str) {
|
|
147
|
-
return
|
|
149
|
+
return $.dim(`${str.padStart(11)} `);
|
|
148
150
|
}
|
|
149
151
|
function truncateString(text, maxLength) {
|
|
150
152
|
return truncateString$1(stripVTControlCharacters(text), maxLength);
|
|
@@ -179,4 +181,4 @@ var utils = /*#__PURE__*/Object.freeze({
|
|
|
179
181
|
withLabel: withLabel
|
|
180
182
|
});
|
|
181
183
|
|
|
182
|
-
export {
|
|
184
|
+
export { F_CHECK as F, F_POINTER as a, F_DOWN_RIGHT as b, formatProjectName as c, getStateString as d, formatTime as e, formatTimeString as f, getStateSymbol as g, countTestErrors as h, errorBanner as i, divider as j, F_TREE_NODE_END as k, F_TREE_NODE_MIDDLE as l, F_RIGHT as m, noun as n, truncateString as o, padSummaryTitle as p, 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.DrHtV5zd.js';
|
|
5
5
|
import { distDir } from '../path.js';
|
|
6
|
-
import { createCustomConsole } from './console.
|
|
6
|
+
import { createCustomConsole } from './console.DtI4yxfN.js';
|
|
7
7
|
import fs__default from 'node:fs';
|
|
8
8
|
import { createRequire, Module, isBuiltin } from 'node:module';
|
|
9
|
-
import { d as dirname, f as extname, b as basename, C as CSS_LANGS_RE, h as KNOWN_ASSET_RE, t as toArray, k as splitFileAndPostfix, n as normalize, l as isBareImport, r as resolve } from './pathe.M-eThtNZ.
|
|
10
|
-
import { l as lookupPackageScopeType } from './resolver.
|
|
9
|
+
import { d as dirname, f as extname, b as basename, C as CSS_LANGS_RE, h as KNOWN_ASSET_RE, t as toArray, k as splitFileAndPostfix, n as normalize, l as isBareImport, r as resolve } from './pathe.M-eThtNZ.Ba-7h1rE.js';
|
|
10
|
+
import { l as lookupPackageScopeType } from './resolver.CtCcxIy1.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.CPNMO3h-.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.BABL3z3m.js';
|
|
16
16
|
import { p as provideWorkerState } from './utils.DYj33du9.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -289,7 +289,7 @@ class CommonjsExecutor {
|
|
|
289
289
|
const __dirname = dirname(filename);
|
|
290
290
|
executor.requireCache.set(filename, this);
|
|
291
291
|
try {
|
|
292
|
-
fn(this.exports, this.require, this, filename, __dirname);
|
|
292
|
+
fn.call(this.exports, this.exports, this.require, this, filename, __dirname);
|
|
293
293
|
return this.exports;
|
|
294
294
|
} finally {
|
|
295
295
|
this.loaded = true;
|
|
@@ -1166,9 +1166,11 @@ class ExternalModulesExecutor {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
1168
|
get isNetworkSupported() {
|
|
1169
|
-
if (this.#networkSupported == null)
|
|
1170
|
-
|
|
1171
|
-
|
|
1169
|
+
if (this.#networkSupported == null) {
|
|
1170
|
+
if (process.execArgv.includes("--experimental-network-imports")) this.#networkSupported = true;
|
|
1171
|
+
else if (process.env.NODE_OPTIONS?.includes("--experimental-network-imports")) this.#networkSupported = true;
|
|
1172
|
+
else this.#networkSupported = false;
|
|
1173
|
+
}
|
|
1172
1174
|
return this.#networkSupported;
|
|
1173
1175
|
}
|
|
1174
1176
|
}
|
|
@@ -1209,8 +1211,9 @@ const moduleInfoCache = /* @__PURE__ */ new Map();
|
|
|
1209
1211
|
async function runVmTests(method, state, traces) {
|
|
1210
1212
|
const { ctx, rpc } = state;
|
|
1211
1213
|
const beforeEnvironmentTime = performance.now();
|
|
1212
|
-
const { environment } = await loadEnvironment(ctx.environment.name, ctx.config.root, rpc, traces, true);
|
|
1214
|
+
const { environment, loader } = await loadEnvironment(ctx.environment.name, ctx.config.root, rpc, traces, true);
|
|
1213
1215
|
state.environment = environment;
|
|
1216
|
+
loader?.evaluatedModules.idToModuleMap.forEach((_, id) => state.dependencies?.add(id));
|
|
1214
1217
|
// let the server transform this file's import graph while this worker is
|
|
1215
1218
|
// busy setting up the environment (jsdom takes ~0.5s per worker) —
|
|
1216
1219
|
// the server is otherwise idle during that window on a cold start.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EvaluatedModules } from 'vite/module-runner';
|
|
2
|
-
import { F as FileSpecification, b as SerializedConfig, X as Task, Y 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, X as Task, Y as CancelReason } from './config.d.QBNYCgFU.js';
|
|
3
|
+
import { a as RuntimeRPC, R as RunnerRPC, G as GetterTracker } from './rpc.d.Cft1biqy.js';
|
|
4
|
+
import { E as Environment } from './environment.d.BY56MoGs.js';
|
|
5
5
|
|
|
6
6
|
//#region src/messages.d.ts
|
|
7
7
|
declare const TYPE_REQUEST: "q";
|
|
@@ -246,6 +246,11 @@ interface WorkerGlobalState {
|
|
|
246
246
|
evaluatedModules: EvaluatedModules;
|
|
247
247
|
resolvingModules: Set<string>;
|
|
248
248
|
moduleExecutionInfo: Map<string, any>;
|
|
249
|
+
/**
|
|
250
|
+
* Module ids and file paths loaded by the current test file. Only set when
|
|
251
|
+
* `experimental.recordDependencies` is enabled.
|
|
252
|
+
*/
|
|
253
|
+
dependencies?: Set<string>;
|
|
249
254
|
getterTracker?: GetterTracker;
|
|
250
255
|
onCancel: (listener: (reason: CancelReason) => unknown) => () => void;
|
|
251
256
|
onCleanup: (listener: () => unknown) => void;
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as createCLI } from './chunks/cac.
|
|
2
|
-
import './chunks/pathe.M-eThtNZ.
|
|
1
|
+
import { c as createCLI } from './chunks/cac.DTXWs6Ni.js';
|
|
2
|
+
import './chunks/pathe.M-eThtNZ.Ba-7h1rE.js';
|
|
3
3
|
import 'events';
|
|
4
|
-
import './chunks/tinyrainbow.
|
|
5
|
-
import './chunks/env.
|
|
4
|
+
import './chunks/tinyrainbow.Do8I1XRG.js';
|
|
5
|
+
import './chunks/env.BKKtU2WC.js';
|
|
6
6
|
import 'std-env';
|
|
7
7
|
import './chunks/constants.-juJ8b_4.js';
|
|
8
8
|
import 'node:assert';
|
package/dist/config.cjs
CHANGED
|
@@ -31,7 +31,7 @@ const coverageConfigDefaults = {
|
|
|
31
31
|
],
|
|
32
32
|
allowExternal: false,
|
|
33
33
|
excludeAfterRemap: false,
|
|
34
|
-
processingConcurrency: Math.min(20, os.availableParallelism
|
|
34
|
+
processingConcurrency: Math.min(20, os.availableParallelism()),
|
|
35
35
|
ignoreClassMethods: [],
|
|
36
36
|
skipFull: false,
|
|
37
37
|
watermarks: {
|
package/dist/config.d.ts
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
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.C8mmycim.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.
|
|
6
|
-
import { C as Config } from './chunks/config.d.
|
|
7
|
-
export { e as TestTagDefinition } from './chunks/config.d.
|
|
5
|
+
export { T as TestProjectConfiguration, c as TestProjectInlineConfiguration, d as TestUserConfig, W as WatcherTriggerPattern } from './chunks/plugin.d.C8mmycim.js';
|
|
6
|
+
import { C as Config } from './chunks/config.d.QBNYCgFU.js';
|
|
7
|
+
export { e as TestTagDefinition } from './chunks/config.d.QBNYCgFU.js';
|
|
8
8
|
import 'node:stream';
|
|
9
|
-
import './chunks/browser.d.
|
|
10
|
-
import './chunks/rpc.d.
|
|
9
|
+
import './chunks/browser.d.FGQ9_rK6.js';
|
|
10
|
+
import './chunks/rpc.d.Cft1biqy.js';
|
|
11
11
|
import 'vite/module-runner';
|
|
12
|
-
import './chunks/worker.d.
|
|
13
|
-
import './chunks/environment.d.
|
|
12
|
+
import './chunks/worker.d.BH-r1bPu.js';
|
|
13
|
+
import './chunks/environment.d.BY56MoGs.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.kzFtk_dj.js';
|
|
18
18
|
import 'vitest/browser';
|
|
19
19
|
import 'node:path';
|
|
20
20
|
import 'node:console';
|
|
21
21
|
import 'node:fs/promises';
|
|
22
|
-
import 'node:fs';
|
|
23
22
|
import 'vitest/optional-runtime-types.js';
|
|
24
23
|
import 'tinybench';
|
|
25
24
|
|
package/dist/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { c as configDefaults, a as coverageConfigDefaults, d as defaultExclude, b as defaultInclude } from './chunks/defaults.
|
|
1
|
+
export { c as configDefaults, a as coverageConfigDefaults, d as defaultExclude, b as defaultInclude } from './chunks/defaults.B1FCaFfh.js';
|
|
2
2
|
export { mergeConfig } from 'vite';
|
|
3
3
|
export { d as defaultBrowserPort } from './chunks/constants.-juJ8b_4.js';
|
|
4
4
|
import 'node:os';
|
|
5
|
-
import './chunks/env.
|
|
5
|
+
import './chunks/env.BKKtU2WC.js';
|
|
6
6
|
import 'std-env';
|
|
7
7
|
|
|
8
8
|
function defineConfig(config) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { a as File, A as Awaitable, g as TestAnnotation, h as TestArtifact, j as TaskResultPack, k as TaskEventPack, U as UserConsoleLog, l as SerializedRootConfig, L as LabelColor, M as ModuleGraphData, m as Test, n as TaskPopulated, E as ExpectStatic, o as ProvidedContext, p as MatcherState, q as SyncExpectationResult, r as AsyncExpectationResult, t as DomainSnapshotAdapter, u as ExpectationResult, v as Procedure, w as Mock, C as Config, x as spyOn, y as fn, z as MaybeMockedDeep, B as MaybeMocked, G as MaybePartiallyMocked, H as MaybePartiallyMockedDeep, I as MockInstance, R as RuntimeOptions, J as TestAPI, K as SuiteCollector, N as SuiteAPI, O as Suite, Q as SuiteHooks, V as VitestRunner, b as SerializedConfig, W as VitestRunnerImportSource, X as Task, Y as CancelReason, Z as TestTryOptions, $ as TestContext, a0 as ImportDuration, a1 as createChainable } from './chunks/config.d.
|
|
2
|
-
export { a2 as AfterSuiteRunMeta, a3 as Assertion, a4 as AsymmetricMatchersContaining, a5 as BaselineData, a6 as Bench, a7 as BenchFn, a8 as BenchFnOptions, a9 as BenchFromSource, aa as BenchOptions, ab as BenchRegistration, ac as BenchRegistrationInput, ad as BenchResult, ae as BenchRunOptions, af as BenchStorage, ag as BenchmarkGroup, ah as BenchmarkProvider, ai as BrowserTraceArtifact, aj as DeeplyAllowMatchers, D as DiffOptions, ak as DomainMatchResult, al as FailureScreenshotArtifact, am as JestAssertion, an as Matcher, ao as Matchers, ap as MatchersObject, aq as MockContext, ar as MockResult, as as MockResultIncomplete, at as MockResultReturn, au as MockResultThrow, av as MockSettledResult, aw as MockSettledResultFulfilled, ax as MockSettledResultIncomplete, ay as MockSettledResultRejected, az as Mocked, aA as MockedClass, aB as MockedFunction, aC as MockedObject, aD as OnTestFailedHandler, aE as OnTestFinishedHandler, P as ParsedStack, aF as RunMode, aG as RunnerTaskBase, aH as RunnerTaskResult, aI as RuntimeConfig, S as SerializedCoverageConfig, aJ as SerializedError, aK as SnapshotData, aL as SnapshotMatchOptions, aM as SnapshotResult, aN as SnapshotSerializer, aO as SnapshotStateOptions, aP as SnapshotSummary, aQ as SnapshotUpdateState, aR as SuiteFactory, aS as SuiteOptions, aT as TaskCustomOptions, aU as TaskMeta, aV as TaskState, aW as TestAnnotationArtifact, aX as TestAnnotationLocation, aY as TestArtifactBase, aZ as TestArtifactLocation, a_ as TestArtifactRegistry, a$ as TestAttachment, b0 as TestBenchmark, b1 as TestBenchmarkTask, T as TestError, b2 as TestFunction, b3 as TestOptions, e as TestTagDefinition, b4 as TestTags, b5 as UncheckedSnapshot, b6 as VisualRegressionArtifact, b7 as afterAll, b8 as afterEach, b9 as aroundAll, ba as aroundEach, bb as beforeAll, bc as beforeEach, bd as onTestFailed, be as onTestFinished } from './chunks/config.d.
|
|
3
|
-
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.
|
|
4
|
-
export { B as BrowserTesterOptions } from './chunks/browser.d.
|
|
5
|
-
import { c as createFileTask } from './chunks/task-utils.d.
|
|
6
|
-
import { B as BirpcReturn } from './chunks/worker.d.
|
|
7
|
-
export { C as ContextRPC, a as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.
|
|
1
|
+
import { a as File, A as Awaitable, g as TestAnnotation, h as TestArtifact, j as TaskResultPack, k as TaskEventPack, U as UserConsoleLog, l as SerializedRootConfig, L as LabelColor, M as ModuleGraphData, m as Test, n as TaskPopulated, E as ExpectStatic, o as ProvidedContext, p as MatcherState, q as SyncExpectationResult, r as AsyncExpectationResult, t as DomainSnapshotAdapter, u as ExpectationResult, v as Procedure, w as Mock, C as Config, x as spyOn, y as fn, z as MaybeMockedDeep, B as MaybeMocked, G as MaybePartiallyMocked, H as MaybePartiallyMockedDeep, I as MockInstance, R as RuntimeOptions, J as TestAPI, K as SuiteCollector, N as SuiteAPI, O as Suite, Q as SuiteHooks, V as VitestRunner, b as SerializedConfig, W as VitestRunnerImportSource, X as Task, Y as CancelReason, Z as TestTryOptions, $ as TestContext, a0 as ImportDuration, a1 as createChainable } from './chunks/config.d.QBNYCgFU.js';
|
|
2
|
+
export { a2 as AfterSuiteRunMeta, a3 as Assertion, a4 as AsymmetricMatchersContaining, a5 as BaselineData, a6 as Bench, a7 as BenchFn, a8 as BenchFnOptions, a9 as BenchFromSource, aa as BenchOptions, ab as BenchRegistration, ac as BenchRegistrationInput, ad as BenchResult, ae as BenchRunOptions, af as BenchStorage, ag as BenchmarkGroup, ah as BenchmarkProvider, ai as BrowserTraceArtifact, aj as DeeplyAllowMatchers, D as DiffOptions, ak as DomainMatchResult, al as FailureScreenshotArtifact, am as JestAssertion, an as Matcher, ao as Matchers, ap as MatchersObject, aq as MockContext, ar as MockResult, as as MockResultIncomplete, at as MockResultReturn, au as MockResultThrow, av as MockSettledResult, aw as MockSettledResultFulfilled, ax as MockSettledResultIncomplete, ay as MockSettledResultRejected, az as Mocked, aA as MockedClass, aB as MockedFunction, aC as MockedObject, aD as OnTestFailedHandler, aE as OnTestFinishedHandler, P as ParsedStack, aF as RunMode, aG as RunnerTaskBase, aH as RunnerTaskResult, aI as RuntimeConfig, S as SerializedCoverageConfig, aJ as SerializedError, aK as SnapshotData, aL as SnapshotMatchOptions, aM as SnapshotResult, aN as SnapshotSerializer, aO as SnapshotStateOptions, aP as SnapshotSummary, aQ as SnapshotUpdateState, aR as SuiteFactory, aS as SuiteOptions, aT as TaskCustomOptions, aU as TaskMeta, aV as TaskState, aW as TestAnnotationArtifact, aX as TestAnnotationLocation, aY as TestArtifactBase, aZ as TestArtifactLocation, a_ as TestArtifactRegistry, a$ as TestAttachment, b0 as TestBenchmark, b1 as TestBenchmarkTask, T as TestError, b2 as TestFunction, b3 as TestOptions, e as TestTagDefinition, b4 as TestTags, b5 as UncheckedSnapshot, b6 as VisualRegressionArtifact, b7 as afterAll, b8 as afterEach, b9 as aroundAll, ba as aroundEach, bb as beforeAll, bc as beforeEach, bd as onTestFailed, be as onTestFinished } from './chunks/config.d.QBNYCgFU.js';
|
|
3
|
+
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.FGQ9_rK6.js';
|
|
4
|
+
export { B as BrowserTesterOptions } from './chunks/browser.d.FGQ9_rK6.js';
|
|
5
|
+
import { c as createFileTask } from './chunks/task-utils.d.PFh2BV6Q.js';
|
|
6
|
+
import { B as BirpcReturn } from './chunks/worker.d.BH-r1bPu.js';
|
|
7
|
+
export { C as ContextRPC, a as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.BH-r1bPu.js';
|
|
8
8
|
import { Disposable } from 'vitest/optional-runtime-types.js';
|
|
9
9
|
import { ModuleMockFactoryWithHelper, ModuleMockOptions } from '@vitest/mocker';
|
|
10
10
|
export { V as EvaluatedModules } from './chunks/evaluatedModules.d.BxJ5omdx.js';
|
|
11
|
-
import { T as Traces } from './chunks/rpc.d.
|
|
12
|
-
export { R as RunnerRPC, a as RuntimeRPC } from './chunks/rpc.d.
|
|
11
|
+
import { T as Traces } from './chunks/rpc.d.Cft1biqy.js';
|
|
12
|
+
export { R as RunnerRPC, a as RuntimeRPC } from './chunks/rpc.d.Cft1biqy.js';
|
|
13
13
|
export { ExpectTypeOf, expectTypeOf } from 'expect-type';
|
|
14
14
|
export { BenchOptions as BenchCompareOptions } from 'tinybench';
|
|
15
15
|
import * as chai from 'chai';
|
|
16
16
|
export { chai };
|
|
17
17
|
import 'vite/module-runner';
|
|
18
|
-
import './chunks/environment.d.
|
|
18
|
+
import './chunks/environment.d.BY56MoGs.js';
|
|
19
19
|
|
|
20
20
|
interface SourceMap {
|
|
21
21
|
file: string;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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 { j as afterAll, k as afterEach, l as aroundAll, n as aroundEach, o as beforeAll, q as beforeEach, r as describe, t as it, u as onTestFailed, v as onTestFinished, w as recordArtifact, x as suite, y as test } from './chunks/run.
|
|
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.uwTEEBsB.js';
|
|
2
|
+
export { V as EvaluatedModules } from './chunks/rpc.DpkUyY1N.js';
|
|
3
|
+
export { j as afterAll, k as afterEach, l as aroundAll, n as aroundEach, o as beforeAll, q as beforeEach, r as describe, t as it, u as onTestFailed, v as onTestFinished, w as recordArtifact, x as suite, y as test } from './chunks/run.Cm2sd7-x.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.
|
|
9
|
-
import './chunks/index.
|
|
10
|
-
import './chunks/tinyrainbow.
|
|
11
|
-
import './chunks/pathe.M-eThtNZ.
|
|
12
|
-
import './chunks/spy.
|
|
13
|
-
import './chunks/display.
|
|
8
|
+
import './chunks/source-map.DdKI5IHB.js';
|
|
9
|
+
import './chunks/index.D0heQG4v.js';
|
|
10
|
+
import './chunks/tinyrainbow.Do8I1XRG.js';
|
|
11
|
+
import './chunks/pathe.M-eThtNZ.Ba-7h1rE.js';
|
|
12
|
+
import './chunks/spy.DDMXghXv.js';
|
|
13
|
+
import './chunks/display.BlTmubjj.js';
|
|
14
14
|
import './task-utils.js';
|
|
15
|
-
import './chunks/plugins.
|
|
15
|
+
import './chunks/plugins.DPQHVT0p.js';
|
|
16
16
|
import './chunks/offset.Dy-5Fdfn.js';
|
|
17
17
|
import 'tinybench';
|
|
18
18
|
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.Cft1biqy.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.QBNYCgFU.js';
|
|
7
7
|
import 'vitest/optional-runtime-types.js';
|
|
8
8
|
import 'tinybench';
|
|
9
9
|
|
package/dist/node.d.ts
CHANGED
|
@@ -3,32 +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 ReportContext, j as TestProject, k as VitestOptions, l as VitestRunMode, m as TestSpecification, n as PoolWorker, o as PoolOptions, p as WorkerRequest, q as TestSequencer } from './chunks/plugin.d.
|
|
7
|
-
export { M as AgentReporter, B as BaseCoverageOptions, r as BaseReporter, s as BenchmarkUserOptions, t as BrowserBuiltinProvider, u as BrowserCommand, v as BrowserCommandContext, w as BrowserConfigOptions, x as BrowserInstanceOption, y as BrowserModuleMocker, z as BrowserOrchestrator, D as BrowserProvider, E as
|
|
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 ReportContext, j as TestProject, k as VitestOptions, l as VitestRunMode, m as TestSpecification, n as PoolWorker, o as PoolOptions, p as WorkerRequest, q as TestSequencer } from './chunks/plugin.d.C8mmycim.js';
|
|
7
|
+
export { M as AgentReporter, B as BaseCoverageOptions, r as BaseReporter, s as BenchmarkUserOptions, t as BrowserBuiltinProvider, u as BrowserCommand, v as BrowserCommandContext, w as BrowserConfigOptions, x as BrowserInstanceOption, y as BrowserModuleMocker, z as BrowserOrchestrator, D as BrowserProvider, E as BrowserProviderCloseOptions, G as BrowserProviderOption, H as BrowserScript, J as BrowserServerContribution, K as BrowserServerFactory, N as BrowserServerState, O as BrowserServerStateSession, Q as BrowserTraceViewOptions, S as BuiltinEnvironment, X as BuiltinReporterOptions, Y as BuiltinReporters, Z as CSSModuleScopeStrategy, _ as CacheKeyIdGenerator, $ as CacheKeyIdGeneratorContext, a0 as CachedTestFileResult, a1 as CoverageInstrumenter, a2 as CoverageIstanbulOptions, C as CoverageOptions, a3 as CoverageProvider, a4 as CoverageProviderModule, a5 as CoverageReporter, a6 as CoverageV8Options, a7 as CustomProviderOptions, a8 as DefaultReporter, a9 as DepsOptimizationOptions, aa as DotReporter, ab as EnvironmentOptions, ac as GithubActionsReporter, ad as HTMLOptions, ae as HangingProcessReporter, I as InlineConfig, af as InstrumenterOptions, ag as JUnitOptions, ah as JUnitReporter, ai as JsonAssertionResult, aj as JsonOptions, ak as JsonReporter, al as JsonTestResult, am as JsonTestResults, M as MinimalReporter, an as ModuleDiagnostic, ao as OnServerRestartHandler, ap as OnTestsRerunHandler, aq as ParentProjectBrowser, ar as Pool, as as PoolRunnerInitializer, at as PoolTask, au as ProjectBrowser, av as ProjectConfig, aw as Report, ax as ReportedHookContext, ay as Reporter, az as ReportersMap, aA as ResolveSnapshotPathHandler, aB as ResolveSnapshotPathHandlerContext, aC as ResolvedBrowserOptions, aD as ResolvedProjectConfig, aE as SerializedTestProject, aF as SuiteNameTemplateVariables, aG as TapFlatReporter, aH as TapReporter, aI as TaskOptions, aJ as TestCase, aK as TestCollection, aL as TestDiagnostic, aM as TestModule, aN as TestModuleState, aO as TestResult, aP as TestResultFailed, aQ as TestResultPassed, aR as TestResultPending, aS as TestResultSkipped, aT as TestRunEndReason, aU as TestRunResult, aV as TestSequencerConstructor, aW as TestSpecificationOptions, aX as TestState, aY as TestSuite, aZ as TestSuiteState, a_ as ToMatchScreenshotComparators, a$ as ToMatchScreenshotOptions, b0 as TypecheckConfig, b1 as UIOptions, U as UserWorkspaceConfig, b2 as VerboseReporter, b3 as VitestEnvironment, b4 as VitestPackageInstaller, V as VitestPluginContext, W as WatcherTriggerPattern, b5 as WorkerResponse, b6 as _BrowserNames, b7 as experimental_getRunnerTask, b8 as startVitest } from './chunks/plugin.d.C8mmycim.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.QBNYCgFU.js';
|
|
10
10
|
import { AfterSuiteRunMeta } from './index.js';
|
|
11
|
-
export { X as RunnerTask, aH as RunnerTaskResult, j as RunnerTaskResultPack, m as RunnerTestCase, a as RunnerTestFile, O as RunnerTestSuite, aI as RuntimeConfig, bf as SequenceHooks, bg as SequenceSetupFiles, aJ as SerializedError, bh as disableDefaultColors } from './chunks/config.d.
|
|
11
|
+
export { X as RunnerTask, aH as RunnerTaskResult, j as RunnerTaskResultPack, m as RunnerTestCase, a as RunnerTestFile, O as RunnerTestSuite, aI as RuntimeConfig, bf as SequenceHooks, bg as SequenceSetupFiles, aJ as SerializedError, bh as disableDefaultColors } from './chunks/config.d.QBNYCgFU.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.BH-r1bPu.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.PFh2BV6Q.js';
|
|
18
18
|
export { CDPSession } from 'vitest/browser';
|
|
19
|
-
import './chunks/browser.d.
|
|
19
|
+
import './chunks/browser.d.FGQ9_rK6.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.kzFtk_dj.js';
|
|
24
24
|
import 'node:path';
|
|
25
25
|
import 'node:console';
|
|
26
26
|
import 'node:fs/promises';
|
|
27
|
-
import 'node:fs';
|
|
28
27
|
import 'vitest/optional-runtime-types.js';
|
|
29
28
|
import 'tinybench';
|
|
30
29
|
import 'vite/module-runner';
|
|
31
|
-
import './chunks/environment.d.
|
|
30
|
+
import './chunks/environment.d.BY56MoGs.js';
|
|
32
31
|
|
|
33
32
|
declare function escapeTestName(label: string, dynamic: boolean): string;
|
|
34
33
|
|
package/dist/node.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
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/
|
|
4
|
-
export { M as AgentReporter, B as BaseCoverageProvider,
|
|
5
|
-
export { c as
|
|
6
|
-
export { c as
|
|
3
|
+
import { V as Vitest } from './chunks/cli-api.Bx28WXzL.js';
|
|
4
|
+
export { M as AgentReporter, B as BaseCoverageProvider, D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, J as JUnitReporter, b as JsonReporter, M as MinimalReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, d as VerboseReporter, e as createVitest, f as experimental_getRunnerTask, i as isValidApiRequest, r as registerConsoleShortcuts, s as startVitest } from './chunks/cli-api.Bx28WXzL.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.B8VfM7Mf.js';
|
|
6
|
+
export { c as createCLI, p as parseCLI } from './chunks/cac.DTXWs6Ni.js';
|
|
7
7
|
export { distDir, rootDir } from './path.js';
|
|
8
8
|
export { generateFileHash } from './task-utils.js';
|
|
9
|
-
export {
|
|
9
|
+
export { w as disableDefaultColors } from './chunks/tinyrainbow.Do8I1XRG.js';
|
|
10
|
+
import 'node:fs';
|
|
11
|
+
import './chunks/coverage.cTDc4uSS.js';
|
|
12
|
+
import './chunks/pathe.M-eThtNZ.Ba-7h1rE.js';
|
|
10
13
|
import 'node:fs/promises';
|
|
11
14
|
import 'node:os';
|
|
12
|
-
import './chunks/
|
|
13
|
-
import './chunks/
|
|
14
|
-
import './chunks/index.cx-_w29y.js';
|
|
15
|
-
import 'node:fs';
|
|
15
|
+
import './chunks/source-map.DdKI5IHB.js';
|
|
16
|
+
import './chunks/index.D0heQG4v.js';
|
|
16
17
|
import 'node:perf_hooks';
|
|
17
18
|
import './chunks/index.DmDMHCg8.js';
|
|
18
19
|
import 'events';
|
|
@@ -27,12 +28,13 @@ import 'zlib';
|
|
|
27
28
|
import 'buffer';
|
|
28
29
|
import 'util';
|
|
29
30
|
import './chunks/constants.-juJ8b_4.js';
|
|
31
|
+
import './chunks/modules.BJuCwlRJ.js';
|
|
32
|
+
import 'node:module';
|
|
30
33
|
import 'node:crypto';
|
|
31
|
-
import './chunks/run.
|
|
32
|
-
import './chunks/display.
|
|
33
|
-
import './chunks/nativeModuleRunner.
|
|
34
|
+
import './chunks/run.Cm2sd7-x.js';
|
|
35
|
+
import './chunks/display.BlTmubjj.js';
|
|
36
|
+
import './chunks/nativeModuleRunner.xi64Afb2.js';
|
|
34
37
|
import 'node:url';
|
|
35
|
-
import 'node:module';
|
|
36
38
|
import 'node:path';
|
|
37
39
|
import 'node:process';
|
|
38
40
|
import 'node:assert';
|
|
@@ -40,30 +42,29 @@ import 'node:v8';
|
|
|
40
42
|
import 'node:util';
|
|
41
43
|
import 'vite/module-runner';
|
|
42
44
|
import './traces.js';
|
|
43
|
-
import '
|
|
44
|
-
import './chunks/resolver.fbW9AUvG.js';
|
|
45
|
-
import 'es-module-lexer';
|
|
46
|
-
import './chunks/env.DzFJjrmK.js';
|
|
47
|
-
import 'std-env';
|
|
45
|
+
import 'picomatch';
|
|
48
46
|
import 'tinyglobby';
|
|
49
|
-
import './chunks/defaults.
|
|
47
|
+
import './chunks/defaults.B1FCaFfh.js';
|
|
48
|
+
import './chunks/env.BKKtU2WC.js';
|
|
49
|
+
import 'std-env';
|
|
50
|
+
import './chunks/utils.DSfl_w8V.js';
|
|
51
|
+
import 'tinyexec';
|
|
52
|
+
import 'node:readline';
|
|
50
53
|
import 'magic-string';
|
|
51
54
|
import '@vitest/mocker/node';
|
|
52
55
|
import 'node:console';
|
|
53
56
|
import 'node:stream';
|
|
54
|
-
import '
|
|
57
|
+
import 'obug';
|
|
58
|
+
import './chunks/resolver.CtCcxIy1.js';
|
|
59
|
+
import 'es-module-lexer';
|
|
55
60
|
import './chunks/offset.Dy-5Fdfn.js';
|
|
56
|
-
import './chunks/utils.RcGwuOc_.js';
|
|
57
61
|
import '#module-evaluator';
|
|
58
|
-
import '
|
|
59
|
-
import './chunks/coverage._yXj5zeb.js';
|
|
62
|
+
import './chunks/module-dependencies.CwNPkcV4.js';
|
|
60
63
|
import 'node:tty';
|
|
61
64
|
import 'node:events';
|
|
62
|
-
import './chunks/modules.BJuCwlRJ.js';
|
|
63
65
|
import 'node:child_process';
|
|
64
66
|
import 'node:worker_threads';
|
|
65
67
|
import 'readline';
|
|
66
|
-
import 'node:readline';
|
|
67
68
|
|
|
68
69
|
const version = Vitest.version;
|
|
69
70
|
const createViteServer = vite.createServer;
|
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 { br as SnapshotEnvironment, bs as SnapshotEnvironmentOptions } from './chunks/config.d.
|
|
4
|
-
export { b as SerializedConfig, V as VitestRunner } from './chunks/config.d.
|
|
1
|
+
import { E as Environment } from './chunks/environment.d.BY56MoGs.js';
|
|
2
|
+
export { a as EnvironmentReturn, V as VmEnvironmentReturn } from './chunks/environment.d.BY56MoGs.js';
|
|
3
|
+
import { br as SnapshotEnvironment, bs as SnapshotEnvironmentOptions } from './chunks/config.d.QBNYCgFU.js';
|
|
4
|
+
export { b as SerializedConfig, V as VitestRunner } from './chunks/config.d.QBNYCgFU.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.CPNMO3h-.js';
|
|
3
|
+
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.CPNMO3h-.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.uQulW0ei.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.Ba-7h1rE.js';
|
|
13
13
|
import './chunks/modules.BJuCwlRJ.js';
|
|
14
14
|
import './path.js';
|
|
15
15
|
import 'node:path';
|
package/dist/spy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as clearAllMocks, d as createMockInstance, f as fn, i as isMockFunction, b as resetAllMocks, r as restoreAllMocks, a as spyOn } from './chunks/spy.
|
|
1
|
+
export { c as clearAllMocks, d as createMockInstance, f as fn, i as isMockFunction, b as resetAllMocks, r as restoreAllMocks, a as spyOn } from './chunks/spy.DDMXghXv.js';
|
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.Ba-7h1rE.js';
|
|
2
2
|
|
|
3
3
|
/* @__NO_SIDE_EFFECTS__ */
|
|
4
4
|
function isTestCase(s) {
|
|
@@ -224,9 +224,11 @@ function interpretTaskModes(file, namePattern, testLocations, testIds, testTagsF
|
|
|
224
224
|
if (namePattern && !t.fullTestName.match(namePattern)) t.mode = "skip";
|
|
225
225
|
if (testIdsSet && !testIdsSet.has(t.id)) t.mode = "skip";
|
|
226
226
|
if (testTagsFilter && !testTagsFilter(t.tags || [])) t.mode = "skip";
|
|
227
|
-
} else if (t.type === "suite")
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
} else if (t.type === "suite") {
|
|
228
|
+
if (t.mode === "skip") skipAllTasks(t);
|
|
229
|
+
else if (t.mode === "todo") todoAllTasks(t);
|
|
230
|
+
else traverseSuite(t, includeTask, hasLocationMatch);
|
|
231
|
+
}
|
|
230
232
|
});
|
|
231
233
|
// if all subtasks are skipped, mark as skip
|
|
232
234
|
if (suite.mode === "run" || suite.mode === "queued") {
|