vitest 1.3.1 → 1.4.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 +1 -1
- package/dist/browser.js +1 -1
- package/dist/chunks/{integrations-globals.THajbSRg.js → integrations-globals.trMeEBob.js} +3 -3
- package/dist/chunks/{runtime-console.Iloo9fIt.js → runtime-console.tUKE_2UJ.js} +4 -4
- package/dist/chunks/{runtime-runBaseTests.9RbsHRbU.js → runtime-runBaseTests.SKlFOhuq.js} +6 -6
- package/dist/cli.js +4 -4
- package/dist/config.d.ts +1 -1
- package/dist/coverage.d.ts +1 -1
- package/dist/environments.d.ts +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -4
- package/dist/node.d.ts +2 -2
- package/dist/node.js +4 -4
- package/dist/{reporters-MmQN-57K.d.ts → reporters-P7C2ytIv.d.ts} +198 -166
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +3 -3
- package/dist/runners.d.ts +2 -1
- package/dist/runners.js +8 -3
- package/dist/{suite-UrZdHRff.d.ts → suite-a18diDsI.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +6 -0
- package/dist/vendor/{base.N3JkKp7j.js → base.Xt0Omgh7.js} +9 -3
- package/dist/vendor/{base.Z38YsPLm.js → base.nhvUBzQY.js} +2 -2
- package/dist/vendor/{cac.wWT9ELdg.js → cac.RvTIWZBK.js} +115 -68
- package/dist/vendor/{execute.27Kk4lQF.js → execute.2_yoIC01.js} +1 -1
- package/dist/vendor/{index.JZMafwT-.js → index.BeX1oZht.js} +1 -1
- package/dist/vendor/{index.9hqYxJUw.js → index.LNWuEnUT.js} +1 -1
- package/dist/vendor/{index.c1V_jzyZ.js → index.e9RDLAeW.js} +39 -21
- package/dist/vendor/{setup-common.snyQUvE3.js → setup-common.vyF1kALR.js} +1 -1
- package/dist/vendor/{utils.GbToHGHI.js → utils.w0xgzP1h.js} +15 -10
- package/dist/vendor/{vi.C5mroSoP.js → vi.JYQecGiw.js} +16 -1
- package/dist/vendor/{vm.o1IruPAo.js → vm.cAHVDF92.js} +2 -2
- package/dist/worker.js +20 -5
- package/dist/workers/forks.js +5 -5
- package/dist/workers/runVmTests.js +5 -5
- package/dist/workers/threads.js +4 -4
- package/dist/workers/vmForks.js +6 -6
- package/dist/workers/vmThreads.js +5 -5
- package/dist/workers.d.ts +6 -3
- package/dist/workers.js +6 -6
- package/package.json +10 -10
|
@@ -11,7 +11,7 @@ async function setupCommonEnv(config) {
|
|
|
11
11
|
globalSetup = true;
|
|
12
12
|
setSafeTimers();
|
|
13
13
|
if (config.globals)
|
|
14
|
-
(await import('../chunks/integrations-globals.
|
|
14
|
+
(await import('../chunks/integrations-globals.trMeEBob.js')).registerApiGlobally();
|
|
15
15
|
}
|
|
16
16
|
function setupDefines(defines) {
|
|
17
17
|
for (const key in defines)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { parseRegexp } from '@vitest/utils';
|
|
2
2
|
|
|
3
|
+
const REGEXP_WRAP_PREFIX = "$$vitest:";
|
|
3
4
|
function createThreadsRpcOptions({ port }) {
|
|
4
5
|
return {
|
|
5
6
|
post: (v) => {
|
|
@@ -26,16 +27,20 @@ function createForksRpcOptions(nodeV8) {
|
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
function unwrapSerializableConfig(config) {
|
|
31
|
+
if (config.testNamePattern && typeof config.testNamePattern === "string") {
|
|
32
|
+
const testNamePattern = config.testNamePattern;
|
|
33
|
+
if (testNamePattern.startsWith(REGEXP_WRAP_PREFIX))
|
|
34
|
+
config.testNamePattern = parseRegexp(testNamePattern.slice(REGEXP_WRAP_PREFIX.length));
|
|
35
|
+
}
|
|
36
|
+
if (config.defines && Array.isArray(config.defines.keys) && config.defines.original) {
|
|
37
|
+
const { keys, original } = config.defines;
|
|
38
|
+
const defines = {};
|
|
39
|
+
for (const key of keys)
|
|
40
|
+
defines[key] = original[key];
|
|
41
|
+
config.defines = defines;
|
|
42
|
+
}
|
|
38
43
|
return config;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
export { createThreadsRpcOptions as a, createForksRpcOptions as c,
|
|
46
|
+
export { createThreadsRpcOptions as a, createForksRpcOptions as c, unwrapSerializableConfig as u };
|
|
@@ -9,7 +9,7 @@ import { g as getFullName } from './tasks.IknbGB2n.js';
|
|
|
9
9
|
import { g as getWorkerState, a as getCurrentEnvironment } from './global.CkGT_TMy.js';
|
|
10
10
|
import { getSafeTimers, assertTypes, createSimpleStackTrace } from '@vitest/utils';
|
|
11
11
|
import { parseSingleStack } from '@vitest/utils/source-map';
|
|
12
|
-
import { i as isChildProcess } from './base.
|
|
12
|
+
import { i as isChildProcess } from './base.Xt0Omgh7.js';
|
|
13
13
|
import { R as RealDate, r as resetDate, m as mockDate } from './date.Ns1pGd_X.js';
|
|
14
14
|
import { spyOn, fn, isMockFunction, mocks } from '@vitest/spy';
|
|
15
15
|
|
|
@@ -221,6 +221,9 @@ const SnapshotPlugin = (chai, utils) => {
|
|
|
221
221
|
chai.Assertion.prototype,
|
|
222
222
|
key,
|
|
223
223
|
function(properties, message) {
|
|
224
|
+
const isNot = utils.flag(this, "negate");
|
|
225
|
+
if (isNot)
|
|
226
|
+
throw new Error(`${key} cannot be used with "not"`);
|
|
224
227
|
const expected = utils.flag(this, "object");
|
|
225
228
|
const test = utils.flag(this, "vitest-test");
|
|
226
229
|
if (typeof properties === "string" && typeof message === "undefined") {
|
|
@@ -243,6 +246,9 @@ const SnapshotPlugin = (chai, utils) => {
|
|
|
243
246
|
chai.Assertion.prototype,
|
|
244
247
|
"toMatchFileSnapshot",
|
|
245
248
|
function(file, message) {
|
|
249
|
+
const isNot = utils.flag(this, "negate");
|
|
250
|
+
if (isNot)
|
|
251
|
+
throw new Error('toMatchFileSnapshot cannot be used with "not"');
|
|
246
252
|
const expected = utils.flag(this, "object");
|
|
247
253
|
const test = utils.flag(this, "vitest-test");
|
|
248
254
|
const errorMessage = utils.flag(this, "message");
|
|
@@ -264,6 +270,9 @@ const SnapshotPlugin = (chai, utils) => {
|
|
|
264
270
|
"toMatchInlineSnapshot",
|
|
265
271
|
function __INLINE_SNAPSHOT__(properties, inlineSnapshot, message) {
|
|
266
272
|
var _a;
|
|
273
|
+
const isNot = utils.flag(this, "negate");
|
|
274
|
+
if (isNot)
|
|
275
|
+
throw new Error('toMatchInlineSnapshot cannot be used with "not"');
|
|
267
276
|
const test = utils.flag(this, "vitest-test");
|
|
268
277
|
const isInsideEach = test && (test.each || ((_a = test.suite) == null ? void 0 : _a.each));
|
|
269
278
|
if (isInsideEach)
|
|
@@ -294,6 +303,9 @@ const SnapshotPlugin = (chai, utils) => {
|
|
|
294
303
|
chai.Assertion.prototype,
|
|
295
304
|
"toThrowErrorMatchingSnapshot",
|
|
296
305
|
function(message) {
|
|
306
|
+
const isNot = utils.flag(this, "negate");
|
|
307
|
+
if (isNot)
|
|
308
|
+
throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');
|
|
297
309
|
const expected = utils.flag(this, "object");
|
|
298
310
|
const test = utils.flag(this, "vitest-test");
|
|
299
311
|
const promise = utils.flag(this, "promise");
|
|
@@ -311,6 +323,9 @@ const SnapshotPlugin = (chai, utils) => {
|
|
|
311
323
|
"toThrowErrorMatchingInlineSnapshot",
|
|
312
324
|
function __INLINE_SNAPSHOT__(inlineSnapshot, message) {
|
|
313
325
|
var _a;
|
|
326
|
+
const isNot = utils.flag(this, "negate");
|
|
327
|
+
if (isNot)
|
|
328
|
+
throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');
|
|
314
329
|
const test = utils.flag(this, "vitest-test");
|
|
315
330
|
const isInsideEach = test && (test.each || ((_a = test.suite) == null ? void 0 : _a.each));
|
|
316
331
|
if (isInsideEach)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import vm, { isContext } from 'node:vm';
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
3
3
|
import { dirname, basename, extname, normalize, join, resolve } from 'pathe';
|
|
4
|
-
import { createCustomConsole } from '../chunks/runtime-console.
|
|
5
|
-
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.
|
|
4
|
+
import { createCustomConsole } from '../chunks/runtime-console.tUKE_2UJ.js';
|
|
5
|
+
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.2_yoIC01.js';
|
|
6
6
|
import { distDir } from '../path.js';
|
|
7
7
|
import { dirname as dirname$1 } from 'node:path';
|
|
8
8
|
import { statSync, existsSync, readFileSync } from 'node:fs';
|
package/dist/worker.js
CHANGED
|
@@ -3,7 +3,7 @@ import { workerId } from 'tinypool';
|
|
|
3
3
|
import { ViteNodeRunner, ModuleCacheMap } from 'vite-node/client';
|
|
4
4
|
import { resolve, normalize } from 'pathe';
|
|
5
5
|
import { e as environments } from './vendor/index.GVFv9dZ0.js';
|
|
6
|
-
import { i as isChildProcess, s as setProcessTitle } from './vendor/base.
|
|
6
|
+
import { i as isChildProcess, s as setProcessTitle } from './vendor/base.Xt0Omgh7.js';
|
|
7
7
|
import { createRequire } from 'node:module';
|
|
8
8
|
import { c as createRuntimeRpc, a as rpcDone } from './vendor/rpc.joBhAkyK.js';
|
|
9
9
|
import 'node:console';
|
|
@@ -52,24 +52,39 @@ async function loadEnvironment(ctx, rpc) {
|
|
|
52
52
|
|
|
53
53
|
const __require = createRequire(import.meta.url);
|
|
54
54
|
let inspector;
|
|
55
|
-
|
|
55
|
+
let session;
|
|
56
|
+
function setupInspect(ctx) {
|
|
56
57
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58
|
+
const config = ctx.config;
|
|
57
59
|
const isEnabled = config.inspect || config.inspectBrk;
|
|
58
60
|
if (isEnabled) {
|
|
59
61
|
inspector = __require("node:inspector");
|
|
60
62
|
const isOpen = inspector.url() !== void 0;
|
|
61
63
|
if (!isOpen) {
|
|
62
64
|
inspector.open();
|
|
63
|
-
if (config.inspectBrk)
|
|
65
|
+
if (config.inspectBrk) {
|
|
64
66
|
inspector.waitForDebugger();
|
|
67
|
+
const firstTestFile = ctx.files[0];
|
|
68
|
+
if (firstTestFile) {
|
|
69
|
+
session = new inspector.Session();
|
|
70
|
+
session.connect();
|
|
71
|
+
session.post("Debugger.enable");
|
|
72
|
+
session.post("Debugger.setBreakpointByUrl", {
|
|
73
|
+
lineNumber: 0,
|
|
74
|
+
url: new URL(firstTestFile, import.meta.url).href
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
65
78
|
}
|
|
66
79
|
}
|
|
67
80
|
const isIsolatedSingleThread = config.pool === "threads" && ((_b = (_a = config.poolOptions) == null ? void 0 : _a.threads) == null ? void 0 : _b.isolate) === false && ((_d = (_c = config.poolOptions) == null ? void 0 : _c.threads) == null ? void 0 : _d.singleThread);
|
|
68
81
|
const isIsolatedSingleFork = config.pool === "forks" && ((_f = (_e = config.poolOptions) == null ? void 0 : _e.forks) == null ? void 0 : _f.isolate) === false && ((_h = (_g = config.poolOptions) == null ? void 0 : _g.forks) == null ? void 0 : _h.singleFork);
|
|
69
82
|
const keepOpen = config.watch && (isIsolatedSingleFork || isIsolatedSingleThread);
|
|
70
83
|
return function cleanup() {
|
|
71
|
-
if (isEnabled && !keepOpen && inspector)
|
|
84
|
+
if (isEnabled && !keepOpen && inspector) {
|
|
72
85
|
inspector.close();
|
|
86
|
+
session == null ? void 0 : session.disconnect();
|
|
87
|
+
}
|
|
73
88
|
};
|
|
74
89
|
}
|
|
75
90
|
|
|
@@ -77,7 +92,7 @@ if (isChildProcess())
|
|
|
77
92
|
setProcessTitle(`vitest ${workerId}`);
|
|
78
93
|
async function run(ctx) {
|
|
79
94
|
const prepareStart = performance.now();
|
|
80
|
-
const inspectorCleanup = setupInspect(ctx
|
|
95
|
+
const inspectorCleanup = setupInspect(ctx);
|
|
81
96
|
process.env.VITEST_WORKER_ID = String(ctx.workerId);
|
|
82
97
|
process.env.VITEST_POOL_ID = String(workerId);
|
|
83
98
|
try {
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { c as createForksRpcOptions, u as
|
|
3
|
-
import { r as runBaseTests } from '../vendor/base.
|
|
2
|
+
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../vendor/utils.w0xgzP1h.js';
|
|
3
|
+
import { r as runBaseTests } from '../vendor/base.nhvUBzQY.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'vite-node/client';
|
|
6
6
|
import '../vendor/global.CkGT_TMy.js';
|
|
7
|
-
import '../vendor/execute.
|
|
7
|
+
import '../vendor/execute.2_yoIC01.js';
|
|
8
8
|
import 'node:vm';
|
|
9
9
|
import 'node:url';
|
|
10
10
|
import 'vite-node/utils';
|
|
@@ -12,7 +12,7 @@ import 'pathe';
|
|
|
12
12
|
import '@vitest/utils/error';
|
|
13
13
|
import '../path.js';
|
|
14
14
|
import 'node:fs';
|
|
15
|
-
import '../vendor/base.
|
|
15
|
+
import '../vendor/base.Xt0Omgh7.js';
|
|
16
16
|
|
|
17
17
|
class ForksBaseWorker {
|
|
18
18
|
getRpcOptions() {
|
|
@@ -20,7 +20,7 @@ class ForksBaseWorker {
|
|
|
20
20
|
}
|
|
21
21
|
async runTests(state) {
|
|
22
22
|
const exit = process.exit;
|
|
23
|
-
state.ctx.config =
|
|
23
|
+
state.ctx.config = unwrapSerializableConfig(state.ctx.config);
|
|
24
24
|
try {
|
|
25
25
|
await runBaseTests(state);
|
|
26
26
|
} finally {
|
|
@@ -6,11 +6,11 @@ import { performance } from 'node:perf_hooks';
|
|
|
6
6
|
import { startTests } from '@vitest/runner';
|
|
7
7
|
import { setupColors, createColors } from '@vitest/utils';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
|
-
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.
|
|
9
|
+
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.LNWuEnUT.js';
|
|
10
10
|
import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.E7sG1b3r.js';
|
|
11
11
|
import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
|
|
12
|
-
import { V as VitestIndex } from '../vendor/index.
|
|
13
|
-
import { s as setupCommonEnv } from '../vendor/setup-common.
|
|
12
|
+
import { V as VitestIndex } from '../vendor/index.BeX1oZht.js';
|
|
13
|
+
import { s as setupCommonEnv } from '../vendor/setup-common.vyF1kALR.js';
|
|
14
14
|
import 'chai';
|
|
15
15
|
import '@vitest/snapshot/environment';
|
|
16
16
|
import 'pathe';
|
|
@@ -23,14 +23,14 @@ import '@vitest/runner/utils';
|
|
|
23
23
|
import '../vendor/index.ir9i0ywP.js';
|
|
24
24
|
import 'std-env';
|
|
25
25
|
import '../vendor/run-once.Olz_Zkd8.js';
|
|
26
|
-
import '../vendor/vi.
|
|
26
|
+
import '../vendor/vi.JYQecGiw.js';
|
|
27
27
|
import '../vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
28
28
|
import '@vitest/expect';
|
|
29
29
|
import '@vitest/snapshot';
|
|
30
30
|
import '@vitest/utils/error';
|
|
31
31
|
import '../vendor/tasks.IknbGB2n.js';
|
|
32
32
|
import '@vitest/utils/source-map';
|
|
33
|
-
import '../vendor/base.
|
|
33
|
+
import '../vendor/base.Xt0Omgh7.js';
|
|
34
34
|
import '../vendor/date.Ns1pGd_X.js';
|
|
35
35
|
import '@vitest/spy';
|
|
36
36
|
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../vendor/base.
|
|
2
|
-
import { a as createThreadsRpcOptions } from '../vendor/utils.
|
|
1
|
+
import { r as runBaseTests } from '../vendor/base.nhvUBzQY.js';
|
|
2
|
+
import { a as createThreadsRpcOptions } from '../vendor/utils.w0xgzP1h.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
4
|
import '../vendor/global.CkGT_TMy.js';
|
|
5
|
-
import '../vendor/execute.
|
|
5
|
+
import '../vendor/execute.2_yoIC01.js';
|
|
6
6
|
import 'node:vm';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'vite-node/utils';
|
|
@@ -11,7 +11,7 @@ import '@vitest/utils/error';
|
|
|
11
11
|
import '../path.js';
|
|
12
12
|
import 'node:fs';
|
|
13
13
|
import '@vitest/utils';
|
|
14
|
-
import '../vendor/base.
|
|
14
|
+
import '../vendor/base.Xt0Omgh7.js';
|
|
15
15
|
|
|
16
16
|
class ThreadsBaseWorker {
|
|
17
17
|
getRpcOptions(ctx) {
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { c as createForksRpcOptions, u as
|
|
3
|
-
import { r as runVmTests } from '../vendor/vm.
|
|
2
|
+
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../vendor/utils.w0xgzP1h.js';
|
|
3
|
+
import { r as runVmTests } from '../vendor/vm.cAHVDF92.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:vm';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'pathe';
|
|
8
|
-
import '../chunks/runtime-console.
|
|
8
|
+
import '../chunks/runtime-console.tUKE_2UJ.js';
|
|
9
9
|
import 'node:stream';
|
|
10
10
|
import 'node:console';
|
|
11
11
|
import 'node:path';
|
|
12
12
|
import '../vendor/date.Ns1pGd_X.js';
|
|
13
|
-
import '../vendor/execute.
|
|
13
|
+
import '../vendor/execute.2_yoIC01.js';
|
|
14
14
|
import 'vite-node/client';
|
|
15
15
|
import 'vite-node/utils';
|
|
16
16
|
import '@vitest/utils/error';
|
|
17
17
|
import '../path.js';
|
|
18
18
|
import 'node:fs';
|
|
19
|
-
import '../vendor/base.
|
|
19
|
+
import '../vendor/base.Xt0Omgh7.js';
|
|
20
20
|
import 'node:module';
|
|
21
21
|
import 'vite-node/constants';
|
|
22
22
|
import '../vendor/index.ir9i0ywP.js';
|
|
@@ -30,7 +30,7 @@ class ForksVmWorker {
|
|
|
30
30
|
}
|
|
31
31
|
async runTests(state) {
|
|
32
32
|
const exit = process.exit;
|
|
33
|
-
state.ctx.config =
|
|
33
|
+
state.ctx.config = unwrapSerializableConfig(state.ctx.config);
|
|
34
34
|
try {
|
|
35
35
|
await runVmTests(state);
|
|
36
36
|
} finally {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { a as createThreadsRpcOptions } from '../vendor/utils.
|
|
2
|
-
import { r as runVmTests } from '../vendor/vm.
|
|
1
|
+
import { a as createThreadsRpcOptions } from '../vendor/utils.w0xgzP1h.js';
|
|
2
|
+
import { r as runVmTests } from '../vendor/vm.cAHVDF92.js';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import 'node:vm';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'pathe';
|
|
7
|
-
import '../chunks/runtime-console.
|
|
7
|
+
import '../chunks/runtime-console.tUKE_2UJ.js';
|
|
8
8
|
import 'node:stream';
|
|
9
9
|
import 'node:console';
|
|
10
10
|
import 'node:path';
|
|
11
11
|
import '../vendor/date.Ns1pGd_X.js';
|
|
12
|
-
import '../vendor/execute.
|
|
12
|
+
import '../vendor/execute.2_yoIC01.js';
|
|
13
13
|
import 'vite-node/client';
|
|
14
14
|
import 'vite-node/utils';
|
|
15
15
|
import '@vitest/utils/error';
|
|
16
16
|
import '../path.js';
|
|
17
17
|
import 'node:fs';
|
|
18
|
-
import '../vendor/base.
|
|
18
|
+
import '../vendor/base.Xt0Omgh7.js';
|
|
19
19
|
import 'node:module';
|
|
20
20
|
import 'vite-node/constants';
|
|
21
21
|
import '../vendor/index.ir9i0ywP.js';
|
package/dist/workers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v8 from 'v8';
|
|
2
|
-
import { d as BirpcOptions, e as RuntimeRPC, f as ContextRPC, W as WorkerGlobalState, g as WorkerContext, R as ResolvedConfig } from './reporters-
|
|
2
|
+
import { d as BirpcOptions, e as RuntimeRPC, f as ContextRPC, W as WorkerGlobalState, g as WorkerContext, R as ResolvedConfig } from './reporters-P7C2ytIv.js';
|
|
3
3
|
import { Awaitable } from '@vitest/utils';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import '@vitest/runner';
|
|
@@ -23,7 +23,10 @@ interface VitestWorker {
|
|
|
23
23
|
|
|
24
24
|
declare function createThreadsRpcOptions({ port }: WorkerContext): WorkerRpcOptions;
|
|
25
25
|
declare function createForksRpcOptions(nodeV8: typeof v8): WorkerRpcOptions;
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Reverts the wrapping done by `utils/config-helpers.ts`'s `wrapSerializableConfig`
|
|
28
|
+
*/
|
|
29
|
+
declare function unwrapSerializableConfig(config: ResolvedConfig): ResolvedConfig;
|
|
27
30
|
|
|
28
31
|
declare function provideWorkerState(context: any, state: WorkerGlobalState): WorkerGlobalState;
|
|
29
32
|
|
|
@@ -33,4 +36,4 @@ declare function runVmTests(state: WorkerGlobalState): Promise<void>;
|
|
|
33
36
|
|
|
34
37
|
declare function runBaseTests(state: WorkerGlobalState): Promise<void>;
|
|
35
38
|
|
|
36
|
-
export { type VitestWorker, type WorkerRpcOptions, createForksRpcOptions, createThreadsRpcOptions, provideWorkerState, runBaseTests, run as runVitestWorker, runVmTests,
|
|
39
|
+
export { type VitestWorker, type WorkerRpcOptions, createForksRpcOptions, createThreadsRpcOptions, provideWorkerState, runBaseTests, run as runVitestWorker, runVmTests, unwrapSerializableConfig };
|
package/dist/workers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as
|
|
1
|
+
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './vendor/utils.w0xgzP1h.js';
|
|
2
2
|
export { p as provideWorkerState } from './vendor/global.CkGT_TMy.js';
|
|
3
3
|
export { run as runVitestWorker } from './worker.js';
|
|
4
|
-
export { r as runVmTests } from './vendor/vm.
|
|
5
|
-
export { r as runBaseTests } from './vendor/base.
|
|
4
|
+
export { r as runVmTests } from './vendor/vm.cAHVDF92.js';
|
|
5
|
+
export { r as runBaseTests } from './vendor/base.nhvUBzQY.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'tinypool';
|
|
@@ -10,16 +10,16 @@ import 'vite-node/client';
|
|
|
10
10
|
import 'pathe';
|
|
11
11
|
import './vendor/index.GVFv9dZ0.js';
|
|
12
12
|
import 'node:console';
|
|
13
|
-
import './vendor/base.
|
|
13
|
+
import './vendor/base.Xt0Omgh7.js';
|
|
14
14
|
import 'node:module';
|
|
15
15
|
import './vendor/rpc.joBhAkyK.js';
|
|
16
16
|
import './vendor/index.8bPxjt7g.js';
|
|
17
17
|
import 'node:vm';
|
|
18
|
-
import './chunks/runtime-console.
|
|
18
|
+
import './chunks/runtime-console.tUKE_2UJ.js';
|
|
19
19
|
import 'node:stream';
|
|
20
20
|
import 'node:path';
|
|
21
21
|
import './vendor/date.Ns1pGd_X.js';
|
|
22
|
-
import './vendor/execute.
|
|
22
|
+
import './vendor/execute.2_yoIC01.js';
|
|
23
23
|
import 'vite-node/utils';
|
|
24
24
|
import '@vitest/utils/error';
|
|
25
25
|
import './path.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"@types/node": "^18.0.0 || >=20.0.0",
|
|
116
116
|
"happy-dom": "*",
|
|
117
117
|
"jsdom": "*",
|
|
118
|
-
"@vitest/browser": "1.
|
|
119
|
-
"@vitest/ui": "1.
|
|
118
|
+
"@vitest/browser": "1.4.0",
|
|
119
|
+
"@vitest/ui": "1.4.0"
|
|
120
120
|
},
|
|
121
121
|
"peerDependenciesMeta": {
|
|
122
122
|
"@edge-runtime/vm": {
|
|
@@ -153,12 +153,12 @@
|
|
|
153
153
|
"tinypool": "^0.8.2",
|
|
154
154
|
"vite": "^5.0.0",
|
|
155
155
|
"why-is-node-running": "^2.2.2",
|
|
156
|
-
"@vitest/expect": "1.
|
|
157
|
-
"@vitest/runner": "1.
|
|
158
|
-
"@vitest/
|
|
159
|
-
"@vitest/
|
|
160
|
-
"@vitest/utils": "1.
|
|
161
|
-
"vite-node": "1.
|
|
156
|
+
"@vitest/expect": "1.4.0",
|
|
157
|
+
"@vitest/runner": "1.4.0",
|
|
158
|
+
"@vitest/spy": "1.4.0",
|
|
159
|
+
"@vitest/snapshot": "1.4.0",
|
|
160
|
+
"@vitest/utils": "1.4.0",
|
|
161
|
+
"vite-node": "1.4.0"
|
|
162
162
|
},
|
|
163
163
|
"devDependencies": {
|
|
164
164
|
"@ampproject/remapping": "^2.2.1",
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"fast-glob": "^3.3.2",
|
|
182
182
|
"find-up": "^6.3.0",
|
|
183
183
|
"flatted": "^3.2.9",
|
|
184
|
-
"get-tsconfig": "^4.7.
|
|
184
|
+
"get-tsconfig": "^4.7.3",
|
|
185
185
|
"happy-dom": "^13.3.8",
|
|
186
186
|
"jsdom": "^24.0.0",
|
|
187
187
|
"log-update": "^5.0.1",
|