vitest 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +5 -5
- package/dist/browser.js +1 -1
- package/dist/chunks/{base.BlXpj3e_.js → base.DwXGwWst.js} +1 -10
- package/dist/chunks/{base.CsQmmYBA.js → base.tiemDJX6.js} +1 -1
- package/dist/chunks/{benchmark.puBFxyfE.d.ts → benchmark.JVlTzojj.d.ts} +2 -0
- package/dist/chunks/{cac.Ce8UWvQp.js → cac.B9PaPYY1.js} +7 -7
- package/dist/chunks/cli-api.CHxC4-U8.js +11754 -0
- package/dist/chunks/{config.CHuotKvS.d.ts → config.Crbj2GAb.d.ts} +3 -0
- package/dist/chunks/{creator.zfBZSJzo.js → creator.Cf-MKt9i.js} +7 -10
- package/dist/chunks/{environment.C5eAp3K6.d.ts → environment.CzISCQ7o.d.ts} +1 -0
- package/dist/chunks/{globals.C03P0O1a.js → globals.HsM2o-0O.js} +3 -3
- package/dist/chunks/{index.Bn75ITYg.js → index.BpojBOif.js} +34 -25
- package/dist/chunks/{index.DkN6V87F.js → index.Ckn0Cw1h.js} +2 -1
- package/dist/chunks/{index.zPibhCkV.js → index.FcPVJkIQ.js} +633 -582
- package/dist/chunks/index.mAqbj9F9.js +140 -0
- package/dist/chunks/{reporters.WnPwkmgA.d.ts → reporters.DAfKSDh5.d.ts} +17 -12
- package/dist/chunks/{resolveConfig.-K5hHm0S.js → resolveConfig.D1DENLPF.js} +3490 -3338
- package/dist/chunks/{runBaseTests.9YDrdSI4.js → runBaseTests.D-Gcin7G.js} +5 -5
- package/dist/chunks/{setup-common.DV1PI68g.js → setup-common.DF96bIYE.js} +1 -1
- package/dist/chunks/{suite.CcK46U-P.d.ts → suite.BMWOKiTe.d.ts} +1 -1
- package/dist/chunks/{utils.Dbnmsfq1.js → utils.CY6Spixo.js} +26 -47
- package/dist/chunks/vi.DUs2eKik.js +3943 -0
- package/dist/chunks/{vite.D2yAwzwa.d.ts → vite.8fk186v-.d.ts} +1 -1
- package/dist/chunks/{worker.CmPmTxgH.d.ts → worker.Chrs-_NL.d.ts} +2 -2
- package/dist/chunks/{worker.Bws9Zuxu.d.ts → worker.Qtv8v5nL.d.ts} +1 -1
- package/dist/cli.js +2 -2
- package/dist/config.cjs +2 -1
- package/dist/config.d.ts +5 -5
- package/dist/config.js +2 -1
- package/dist/coverage.d.ts +4 -4
- package/dist/coverage.js +2 -2
- package/dist/environments.d.ts +2 -2
- package/dist/execute.d.ts +3 -3
- package/dist/index.d.ts +14 -14
- package/dist/index.js +5 -5
- package/dist/node.d.ts +8 -8
- package/dist/node.js +9 -9
- package/dist/reporters.d.ts +4 -4
- package/dist/reporters.js +4 -3
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +8 -2
- package/dist/suite.d.ts +2 -2
- package/dist/worker.js +11 -3
- package/dist/workers/forks.js +1 -1
- package/dist/workers/runVmTests.js +8 -5
- package/dist/workers/threads.js +1 -1
- package/dist/workers.d.ts +4 -4
- package/dist/workers.js +2 -2
- package/package.json +11 -12
- package/dist/chunks/cli-api.KmLFBnKP.js +0 -11397
- package/dist/chunks/index.iyKRMe3s.js +0 -131
- package/dist/chunks/vi.D6IHiKAI.js +0 -3746
|
@@ -5,16 +5,16 @@ import '@vitest/runner/utils';
|
|
|
5
5
|
import { getSafeTimers } from '@vitest/utils';
|
|
6
6
|
import { g as getWorkerState } from './utils.Ck2hJTRs.js';
|
|
7
7
|
import './env.CmHVDJnw.js';
|
|
8
|
-
import { a as globalExpect, r as resetModules, v as vi } from './vi.
|
|
8
|
+
import { a as globalExpect, r as resetModules, v as vi } from './vi.DUs2eKik.js';
|
|
9
9
|
import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from './coverage.zlNdAMHK.js';
|
|
10
|
-
import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './index.
|
|
10
|
+
import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './index.Ckn0Cw1h.js';
|
|
11
11
|
import { createRequire } from 'node:module';
|
|
12
12
|
import util from 'node:util';
|
|
13
13
|
import timers from 'node:timers';
|
|
14
14
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
15
15
|
import { KNOWN_ASSET_TYPES } from 'vite-node/constants';
|
|
16
|
-
import { V as VitestIndex } from './index.
|
|
17
|
-
import { s as setupCommonEnv } from './setup-common.
|
|
16
|
+
import { V as VitestIndex } from './index.mAqbj9F9.js';
|
|
17
|
+
import { s as setupCommonEnv } from './setup-common.DF96bIYE.js';
|
|
18
18
|
import { c as closeInspector } from './inspector.70d6emsh.js';
|
|
19
19
|
import 'std-env';
|
|
20
20
|
import 'chai';
|
|
@@ -24,7 +24,7 @@ import '@vitest/snapshot';
|
|
|
24
24
|
import '@vitest/utils/error';
|
|
25
25
|
import './tasks.BZnCS9aT.js';
|
|
26
26
|
import '@vitest/utils/source-map';
|
|
27
|
-
import './base.
|
|
27
|
+
import './base.DwXGwWst.js';
|
|
28
28
|
import './date.W2xKR2qe.js';
|
|
29
29
|
import '@vitest/spy';
|
|
30
30
|
import '../path.js';
|
|
@@ -13,7 +13,7 @@ async function setupCommonEnv(config) {
|
|
|
13
13
|
globalSetup = true;
|
|
14
14
|
setSafeTimers();
|
|
15
15
|
if (config.globals) {
|
|
16
|
-
(await import('./globals.
|
|
16
|
+
(await import('./globals.HsM2o-0O.js')).registerApiGlobally();
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
function setupDefines(defines) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Custom } from '@vitest/runner';
|
|
2
2
|
import '@vitest/runner/utils';
|
|
3
|
-
import { b as BenchFunction, c as BenchmarkAPI } from './benchmark.
|
|
3
|
+
import { b as BenchFunction, c as BenchmarkAPI } from './benchmark.JVlTzojj.js';
|
|
4
4
|
import { Options } from 'tinybench';
|
|
5
5
|
|
|
6
6
|
declare function getBenchOptions(key: Custom): Options;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { stripVTControlCharacters } from 'node:util';
|
|
1
2
|
import { isAbsolute, relative, dirname, basename } from 'pathe';
|
|
2
3
|
import c from 'tinyrainbow';
|
|
3
|
-
import { a as slash } from './base.
|
|
4
|
+
import { a as slash } from './base.DwXGwWst.js';
|
|
4
5
|
|
|
5
6
|
const F_RIGHT = "\u2192";
|
|
6
7
|
const F_DOWN = "\u2193";
|
|
@@ -11,28 +12,6 @@ const F_CHECK = "\u2713";
|
|
|
11
12
|
const F_CROSS = "\xD7";
|
|
12
13
|
const F_LONG_DASH = "\u23AF";
|
|
13
14
|
|
|
14
|
-
function ansiRegex({onlyFirst = false} = {}) {
|
|
15
|
-
const pattern = [
|
|
16
|
-
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
17
|
-
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
|
|
18
|
-
].join('|');
|
|
19
|
-
|
|
20
|
-
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const regex = ansiRegex();
|
|
24
|
-
|
|
25
|
-
function stripAnsi(string) {
|
|
26
|
-
if (typeof string !== 'string') {
|
|
27
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Even though the regex is global, we don't need to reset the `.lastIndex`
|
|
31
|
-
// because unlike `.exec()` and `.test()`, `.replace()` does it automatically
|
|
32
|
-
// and doing it manually has a performance penalty.
|
|
33
|
-
return string.replace(regex, '');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
15
|
const spinnerMap = /* @__PURE__ */ new WeakMap();
|
|
37
16
|
const hookSpinnerMap = /* @__PURE__ */ new WeakMap();
|
|
38
17
|
const pointer = c.yellow(F_POINTER);
|
|
@@ -52,7 +31,7 @@ function getCols(delta = 0) {
|
|
|
52
31
|
function divider(text, left, right) {
|
|
53
32
|
const cols = getCols();
|
|
54
33
|
if (text) {
|
|
55
|
-
const textLength =
|
|
34
|
+
const textLength = stripVTControlCharacters(text).length;
|
|
56
35
|
if (left == null && right != null) {
|
|
57
36
|
left = cols - textLength - right;
|
|
58
37
|
} else {
|
|
@@ -202,28 +181,28 @@ function formatProjectName(name, suffix = " ") {
|
|
|
202
181
|
}
|
|
203
182
|
|
|
204
183
|
var utils = /*#__PURE__*/Object.freeze({
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
184
|
+
__proto__: null,
|
|
185
|
+
benchmarkPass: benchmarkPass,
|
|
186
|
+
countTestErrors: countTestErrors,
|
|
187
|
+
divider: divider,
|
|
188
|
+
elegantSpinner: elegantSpinner,
|
|
189
|
+
formatProjectName: formatProjectName,
|
|
190
|
+
formatTestPath: formatTestPath,
|
|
191
|
+
formatTimeString: formatTimeString,
|
|
192
|
+
getCols: getCols,
|
|
193
|
+
getHookStateSymbol: getHookStateSymbol,
|
|
194
|
+
getStateString: getStateString,
|
|
195
|
+
getStateSymbol: getStateSymbol,
|
|
196
|
+
hookSpinnerMap: hookSpinnerMap,
|
|
197
|
+
pending: pending,
|
|
198
|
+
pointer: pointer,
|
|
199
|
+
renderSnapshotSummary: renderSnapshotSummary,
|
|
200
|
+
skipped: skipped,
|
|
201
|
+
spinnerFrames: spinnerFrames,
|
|
202
|
+
spinnerMap: spinnerMap,
|
|
203
|
+
suiteFail: suiteFail,
|
|
204
|
+
taskFail: taskFail,
|
|
205
|
+
testPass: testPass
|
|
227
206
|
});
|
|
228
207
|
|
|
229
|
-
export { F_RIGHT as F, F_POINTER as a, getStateString as b, formatTimeString as c, countTestErrors as d, divider as e, formatProjectName as f, getStateSymbol as g, getCols as h, getHookStateSymbol as i, renderSnapshotSummary as r,
|
|
208
|
+
export { F_RIGHT as F, F_POINTER as a, getStateString as b, formatTimeString as c, countTestErrors as d, divider as e, formatProjectName as f, getStateSymbol as g, getCols as h, getHookStateSymbol as i, renderSnapshotSummary as r, taskFail as t, utils as u };
|