vitest 2.0.4 → 2.0.5
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 +21 -42
- package/dist/browser.js +5 -5
- package/dist/{vendor/base.Csk7BT3h.js → chunks/base.CC5R_kgU.js} +3 -3
- package/dist/{vendor/base.DRHPZCCj.js → chunks/base.DSsbfkDg.js} +1 -1
- package/dist/{vendor/benchmark.B6pblCp2.js → chunks/benchmark.DDmpNjj-.js} +1 -1
- package/dist/chunks/benchmark.puBFxyfE.d.ts +22 -0
- package/dist/{vendor/cac.DFtWvZc2.js → chunks/cac.DGgmCKmU.js} +17 -20
- package/dist/{vendor/cli-api.CTkP2Ier.js → chunks/cli-api.OKfd3qJ0.js} +416 -423
- package/dist/chunks/config.DCnyCTbs.d.ts +203 -0
- package/dist/chunks/{runtime-console.C2L2zykk.js → console.Bgn7_A1x.js} +11 -14
- package/dist/{vendor/constants.CsnA4eRy.js → chunks/constants.CaAN7icJ.js} +1 -3
- package/dist/{vendor/coverage.BhYSDdTT.js → chunks/coverage.CqfT4xaf.js} +4 -7
- package/dist/chunks/{browser-creator.CyaOd8pl.js → creator.a3OfuIEW.js} +8 -8
- package/dist/{vendor/env.2ltrQNq0.js → chunks/env.BU041cs9.js} +2 -3
- package/dist/chunks/environment.0M5R1SX_.d.ts +173 -0
- package/dist/{vendor/execute.jzOWtys_.js → chunks/execute.Cjlr2CRw.js} +27 -19
- package/dist/chunks/globals.BliuJFNR.js +31 -0
- package/dist/{vendor/index.DI9daj1Q.js → chunks/index.BfeNhc0N.js} +43 -43
- package/dist/{vendor/index.D6GZqexG.js → chunks/index.CM5UI-4O.js} +2 -2
- package/dist/{vendor/index.BJmtb_7W.js → chunks/index.DYufA6CZ.js} +2 -2
- package/dist/{vendor/index.CuuL9y4g.js → chunks/index.JbiJutJ_.js} +515 -255
- package/dist/{vendor/index.CVqMv71L.js → chunks/index.R1VjssW9.js} +11 -12
- package/dist/{vendor/index.D4nqnQWz.js → chunks/index.lVXYBqEP.js} +1 -18
- package/dist/{vendor/inspector.-FCQUzqR.js → chunks/inspector.70d6emsh.js} +4 -5
- package/dist/chunks/{environments-node.XE5FbRPQ.js → node.DS3zEPa7.js} +2 -2
- package/dist/{reporters-B7ebVMkT.d.ts → chunks/reporters.C_zwCd4j.d.ts} +847 -1000
- package/dist/{vendor/rpc.BGx7q_k2.js → chunks/rpc.B7Mfb-Yf.js} +3 -5
- package/dist/{vendor/run-once.Db8Hgq9X.js → chunks/run-once.Sxe67Wng.js} +1 -1
- package/dist/chunks/{runtime-runBaseTests.Dq_sJZq9.js → runBaseTests.CyvqmuC9.js} +21 -23
- package/dist/{vendor/setup-common.symvFZPh.js → chunks/setup-common.CNzatKMx.js} +2 -2
- package/dist/{suite-CRLAhsm0.d.ts → chunks/suite.CcK46U-P.d.ts} +1 -1
- package/dist/{vendor/tasks.DhVtQBtW.js → chunks/tasks.BZnCS9aT.js} +2 -3
- package/dist/{vendor/utils.DkxLWvS1.js → chunks/utils.C3_cBsyn.js} +3 -4
- package/dist/{vendor/global.7bFbnyXl.js → chunks/utils.Ck2hJTRs.js} +1 -1
- package/dist/{vendor/utils.BySfPUwy.js → chunks/utils.DpP_sDwr.js} +8 -21
- package/dist/{vendor/vi.Elqer9-7.js → chunks/vi.fiQ7lMRF.js} +13 -18
- package/dist/{vendor/vm.img-AOox.js → chunks/vm.DcSuuaHr.js} +40 -68
- package/dist/chunks/worker.C5iHKIaJ.d.ts +144 -0
- package/dist/chunks/worker.DKkAC4Qw.d.ts +8 -0
- package/dist/cli.js +3 -3
- package/dist/config.cjs +6 -8
- package/dist/config.d.ts +10 -8
- package/dist/config.js +6 -8
- package/dist/coverage.d.ts +10 -8
- package/dist/coverage.js +2 -2
- package/dist/environments.d.ts +3 -19
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +5 -14
- package/dist/execute.js +2 -2
- package/dist/index.d.ts +267 -34
- package/dist/index.js +12 -12
- package/dist/node.d.ts +15 -9
- package/dist/node.js +16 -19
- package/dist/reporters.d.ts +10 -8
- package/dist/reporters.js +12 -15
- package/dist/runners.d.ts +7 -19
- package/dist/runners.js +12 -13
- package/dist/snapshot.js +3 -3
- package/dist/suite.d.ts +2 -16
- package/dist/suite.js +4 -4
- package/dist/worker.js +7 -8
- package/dist/workers/forks.js +5 -5
- package/dist/workers/runVmTests.js +18 -19
- package/dist/workers/threads.js +5 -5
- package/dist/workers/vmForks.js +8 -8
- package/dist/workers/vmThreads.js +8 -8
- package/dist/workers.d.ts +13 -8
- package/dist/workers.js +13 -13
- package/package.json +13 -13
- package/dist/chunks/integrations-globals.nDMtdOcn.js +0 -31
- /package/dist/{vendor → chunks}/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/{vendor → chunks}/date.W2xKR2qe.js +0 -0
- /package/dist/chunks/{node-git.ZtkbKc8u.js → git.ZtkbKc8u.js} +0 -0
- /package/dist/{vendor → chunks}/index.BMmMjLIQ.js +0 -0
- /package/dist/{vendor → chunks}/index.BpSiYbpB.js +0 -0
- /package/dist/chunks/{install-pkg.DNUmWFkO.js → index.DNUmWFkO.js} +0 -0
- /package/dist/{vendor → chunks}/spy.Cf_4R5Oe.js +0 -0
|
@@ -7,7 +7,7 @@ import { resolve, isAbsolute, dirname, join, basename, extname, normalize, relat
|
|
|
7
7
|
import { processError } from '@vitest/utils/error';
|
|
8
8
|
import { distDir } from '../path.js';
|
|
9
9
|
import { highlight, getType } from '@vitest/utils';
|
|
10
|
-
import { g as getAllMockableProperties } from './base.
|
|
10
|
+
import { g as getAllMockableProperties } from './base.DSsbfkDg.js';
|
|
11
11
|
|
|
12
12
|
const { existsSync, readdirSync } = fs;
|
|
13
13
|
const spyModulePath = resolve(distDir, "spy.js");
|
|
@@ -136,7 +136,7 @@ class VitestMocker {
|
|
|
136
136
|
return {
|
|
137
137
|
id,
|
|
138
138
|
fsPath,
|
|
139
|
-
external
|
|
139
|
+
external: external ? this.normalizePath(external) : external
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
async resolveMocks() {
|
|
@@ -160,8 +160,7 @@ class VitestMocker {
|
|
|
160
160
|
VitestMocker.pendingIds = [];
|
|
161
161
|
}
|
|
162
162
|
async callFunctionMock(dep, mock) {
|
|
163
|
-
|
|
164
|
-
const cached = (_a = this.moduleCache.get(dep)) == null ? void 0 : _a.exports;
|
|
163
|
+
const cached = this.moduleCache.get(dep)?.exports;
|
|
165
164
|
if (cached) {
|
|
166
165
|
return cached;
|
|
167
166
|
}
|
|
@@ -176,7 +175,7 @@ class VitestMocker {
|
|
|
176
175
|
throw vitestError;
|
|
177
176
|
}
|
|
178
177
|
const filepath = dep.slice(5);
|
|
179
|
-
const mockpath =
|
|
178
|
+
const mockpath = this.resolveCache.get(this.getSuiteFilepath())?.[filepath] || filepath;
|
|
180
179
|
if (exports === null || typeof exports !== "object") {
|
|
181
180
|
throw this.createError(
|
|
182
181
|
`[vitest] vi.mock("${mockpath}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`
|
|
@@ -229,6 +228,23 @@ If you need to partially mock a module, you can use "importOriginal" helper insi
|
|
|
229
228
|
resolveMockPath(mockPath, external) {
|
|
230
229
|
const path = external || mockPath;
|
|
231
230
|
if (external || isNodeBuiltin(mockPath) || !existsSync(mockPath)) {
|
|
231
|
+
let findFile2 = function(files2, baseOriginal2) {
|
|
232
|
+
for (const file of files2) {
|
|
233
|
+
const baseFile = basename(file, extname(file));
|
|
234
|
+
if (baseFile === baseOriginal2) {
|
|
235
|
+
const path2 = resolve(mockFolder, file);
|
|
236
|
+
if (fs.statSync(path2).isFile()) {
|
|
237
|
+
return path2;
|
|
238
|
+
} else {
|
|
239
|
+
const indexFile = findFile2(readdirSync(path2), "index");
|
|
240
|
+
if (indexFile) {
|
|
241
|
+
return indexFile;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return null;
|
|
247
|
+
};
|
|
232
248
|
const mockDirname = dirname(path);
|
|
233
249
|
const mockFolder = join(this.root, "__mocks__", mockDirname);
|
|
234
250
|
if (!existsSync(mockFolder)) {
|
|
@@ -236,13 +252,7 @@ If you need to partially mock a module, you can use "importOriginal" helper insi
|
|
|
236
252
|
}
|
|
237
253
|
const files = readdirSync(mockFolder);
|
|
238
254
|
const baseOriginal = basename(path);
|
|
239
|
-
|
|
240
|
-
const baseFile = basename(file, extname(file));
|
|
241
|
-
if (baseFile === baseOriginal) {
|
|
242
|
-
return resolve(mockFolder, file);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return null;
|
|
255
|
+
return findFile2(files, baseOriginal);
|
|
246
256
|
}
|
|
247
257
|
const dir = dirname(path);
|
|
248
258
|
const baseId = basename(path);
|
|
@@ -365,7 +375,7 @@ If you need to partially mock a module, you can use "importOriginal" helper insi
|
|
|
365
375
|
const suitefile = this.getSuiteFilepath();
|
|
366
376
|
const mocks = this.mockMap.get(suitefile) || {};
|
|
367
377
|
const resolves = this.resolveCache.get(suitefile) || {};
|
|
368
|
-
mocks[id] = factory || this.resolveMockPath(
|
|
378
|
+
mocks[id] = factory || this.resolveMockPath(id, external);
|
|
369
379
|
resolves[id] = originalId;
|
|
370
380
|
this.mockMap.set(suitefile, mocks);
|
|
371
381
|
this.resolveCache.set(suitefile, resolves);
|
|
@@ -385,7 +395,7 @@ If you need to partially mock a module, you can use "importOriginal" helper insi
|
|
|
385
395
|
const normalizedId = this.normalizePath(fsPath);
|
|
386
396
|
let mock = this.getDependencyMock(normalizedId);
|
|
387
397
|
if (mock === void 0) {
|
|
388
|
-
mock = this.resolveMockPath(
|
|
398
|
+
mock = this.resolveMockPath(normalizedId, external);
|
|
389
399
|
}
|
|
390
400
|
if (mock === null) {
|
|
391
401
|
const mod = await this.executor.cachedRequest(id, fsPath, [importee]);
|
|
@@ -459,7 +469,6 @@ function listenForErrors(state) {
|
|
|
459
469
|
dispose.forEach((fn) => fn());
|
|
460
470
|
dispose.length = 0;
|
|
461
471
|
function catchError(err, type, event) {
|
|
462
|
-
var _a;
|
|
463
472
|
const worker = state();
|
|
464
473
|
if (worker.current) {
|
|
465
474
|
const listeners = process.listeners(event);
|
|
@@ -469,7 +478,7 @@ function listenForErrors(state) {
|
|
|
469
478
|
}
|
|
470
479
|
const error = processError(err);
|
|
471
480
|
if (!isPrimitive(error)) {
|
|
472
|
-
error.VITEST_TEST_NAME =
|
|
481
|
+
error.VITEST_TEST_NAME = worker.current?.name;
|
|
473
482
|
if (worker.filepath) {
|
|
474
483
|
error.VITEST_TEST_PATH = relative(state().config.root, worker.filepath);
|
|
475
484
|
}
|
|
@@ -559,7 +568,7 @@ function updateStyle(id, css) {
|
|
|
559
568
|
style.setAttribute("type", "text/css");
|
|
560
569
|
style.setAttribute("data-vite-dev-id", id);
|
|
561
570
|
style.textContent = css;
|
|
562
|
-
head
|
|
571
|
+
head?.appendChild(style);
|
|
563
572
|
}
|
|
564
573
|
function removeStyle(id) {
|
|
565
574
|
if (typeof document === "undefined") {
|
|
@@ -629,11 +638,10 @@ class VitestExecutor extends ViteNodeRunner {
|
|
|
629
638
|
return globalThis.__vitest_worker__ || this.options.state;
|
|
630
639
|
}
|
|
631
640
|
shouldResolveId(id, _importee) {
|
|
632
|
-
var _a;
|
|
633
641
|
if (isInternalRequest(id) || id.startsWith("data:")) {
|
|
634
642
|
return false;
|
|
635
643
|
}
|
|
636
|
-
const transformMode =
|
|
644
|
+
const transformMode = this.state.environment?.transformMode ?? "ssr";
|
|
637
645
|
return transformMode === "ssr" ? !isNodeBuiltin(id) : !id.startsWith("node:");
|
|
638
646
|
}
|
|
639
647
|
async originalResolveUrl(id, importer) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { g as globalApis } from './constants.CaAN7icJ.js';
|
|
2
|
+
import { V as VitestIndex } from './index.BfeNhc0N.js';
|
|
3
|
+
import '@vitest/runner';
|
|
4
|
+
import './benchmark.DDmpNjj-.js';
|
|
5
|
+
import '@vitest/runner/utils';
|
|
6
|
+
import '@vitest/utils';
|
|
7
|
+
import './index.DYufA6CZ.js';
|
|
8
|
+
import 'pathe';
|
|
9
|
+
import './utils.Ck2hJTRs.js';
|
|
10
|
+
import './env.BU041cs9.js';
|
|
11
|
+
import 'std-env';
|
|
12
|
+
import './run-once.Sxe67Wng.js';
|
|
13
|
+
import './vi.fiQ7lMRF.js';
|
|
14
|
+
import 'chai';
|
|
15
|
+
import './_commonjsHelpers.BFTU3MAI.js';
|
|
16
|
+
import '@vitest/expect';
|
|
17
|
+
import '@vitest/snapshot';
|
|
18
|
+
import '@vitest/utils/error';
|
|
19
|
+
import './tasks.BZnCS9aT.js';
|
|
20
|
+
import '@vitest/utils/source-map';
|
|
21
|
+
import './base.DSsbfkDg.js';
|
|
22
|
+
import './date.W2xKR2qe.js';
|
|
23
|
+
import '@vitest/spy';
|
|
24
|
+
|
|
25
|
+
function registerApiGlobally() {
|
|
26
|
+
globalApis.forEach((api) => {
|
|
27
|
+
globalThis[api] = VitestIndex[api];
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { registerApiGlobally };
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
2
|
-
import { b as bench } from './benchmark.
|
|
3
|
-
import { i as isFirstRun, a as runOnce } from './run-once.
|
|
4
|
-
import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.
|
|
5
|
-
import { g as getWorkerState } from './
|
|
2
|
+
import { b as bench } from './benchmark.DDmpNjj-.js';
|
|
3
|
+
import { i as isFirstRun, a as runOnce } from './run-once.Sxe67Wng.js';
|
|
4
|
+
import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.fiQ7lMRF.js';
|
|
5
|
+
import { g as getWorkerState } from './utils.Ck2hJTRs.js';
|
|
6
6
|
import * as chai from 'chai';
|
|
7
7
|
import { assert, should } from 'chai';
|
|
8
8
|
|
|
9
|
-
function getRunningMode() {
|
|
10
|
-
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
11
|
-
}
|
|
12
|
-
function isWatchMode() {
|
|
13
|
-
return getRunningMode() === "watch";
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function inject(key) {
|
|
17
|
-
const workerState = getWorkerState();
|
|
18
|
-
return workerState.providedContext[key];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
9
|
var dist = {};
|
|
22
10
|
|
|
23
11
|
(function (exports) {
|
|
@@ -99,33 +87,45 @@ function noop() {
|
|
|
99
87
|
}
|
|
100
88
|
const assertType = noop;
|
|
101
89
|
|
|
90
|
+
function getRunningMode() {
|
|
91
|
+
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
92
|
+
}
|
|
93
|
+
function isWatchMode() {
|
|
94
|
+
return getRunningMode() === "watch";
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function inject(key) {
|
|
98
|
+
const workerState = getWorkerState();
|
|
99
|
+
return workerState.providedContext[key];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
102
|
var VitestIndex = /*#__PURE__*/Object.freeze({
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
103
|
+
__proto__: null,
|
|
104
|
+
afterAll: afterAll,
|
|
105
|
+
afterEach: afterEach,
|
|
106
|
+
assert: assert,
|
|
107
|
+
assertType: assertType,
|
|
108
|
+
beforeAll: beforeAll,
|
|
109
|
+
beforeEach: beforeEach,
|
|
110
|
+
bench: bench,
|
|
111
|
+
chai: chai,
|
|
112
|
+
createExpect: createExpect,
|
|
113
|
+
describe: describe,
|
|
114
|
+
expect: globalExpect,
|
|
115
|
+
expectTypeOf: dist.expectTypeOf,
|
|
116
|
+
getRunningMode: getRunningMode,
|
|
117
|
+
inject: inject,
|
|
118
|
+
isFirstRun: isFirstRun,
|
|
119
|
+
isWatchMode: isWatchMode,
|
|
120
|
+
it: it,
|
|
121
|
+
onTestFailed: onTestFailed,
|
|
122
|
+
onTestFinished: onTestFinished,
|
|
123
|
+
runOnce: runOnce,
|
|
124
|
+
should: should,
|
|
125
|
+
suite: suite,
|
|
126
|
+
test: test,
|
|
127
|
+
vi: vi,
|
|
128
|
+
vitest: vitest
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
export { VitestIndex as V,
|
|
131
|
+
export { VitestIndex as V, assertType as a, inject as b, dist as d, getRunningMode as g, isWatchMode as i };
|
|
@@ -546,7 +546,7 @@ function requireClear$1 () {
|
|
|
546
546
|
if (hasRequiredClear$1) return clear$1;
|
|
547
547
|
hasRequiredClear$1 = 1;
|
|
548
548
|
|
|
549
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike
|
|
549
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
550
550
|
|
|
551
551
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
552
552
|
|
|
@@ -3505,7 +3505,7 @@ function requireDist () {
|
|
|
3505
3505
|
|
|
3506
3506
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3507
3507
|
|
|
3508
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike
|
|
3508
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3509
3509
|
|
|
3510
3510
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3511
3511
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { relative } from 'pathe';
|
|
2
2
|
import '@vitest/runner/utils';
|
|
3
3
|
import '@vitest/utils';
|
|
4
|
-
import { g as getWorkerState } from './
|
|
5
|
-
import './env.
|
|
4
|
+
import { g as getWorkerState } from './utils.Ck2hJTRs.js';
|
|
5
|
+
import './env.BU041cs9.js';
|
|
6
6
|
|
|
7
7
|
function getRunMode() {
|
|
8
8
|
return getWorkerState().config.mode;
|