vitest 3.0.0-beta.4 → 3.0.1
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 +2 -2
- package/dist/browser.js +1 -1
- package/dist/chunks/{base.BJ8KO-VX.js → base.gZAre3Yy.js} +3 -3
- package/dist/chunks/{cac.BAYqQ2aM.js → cac.Davy6Tyx.js} +24 -24
- package/dist/chunks/{cli-api.Dhl34Trr.js → cli-api.DO-hp2Kx.js} +1031 -162
- package/dist/chunks/{console.CN7AiMGV.js → console.BxE0RUCr.js} +3 -3
- package/dist/chunks/{creator.Ot9GlSGw.js → creator.B8v1wNyQ.js} +3 -3
- package/dist/chunks/{execute.BMOaRArH.js → execute.4vt3NSmG.js} +3 -4
- package/dist/chunks/global.CnI8_G5V.d.ts +133 -0
- package/dist/chunks/{globals.C5RQxaV3.js → globals.BSNBk3vE.js} +2 -2
- package/dist/chunks/{index.BQbxGbG9.js → index.Bf4FgyZN.js} +1 -1
- package/dist/chunks/{index.BJDntFik.js → index.Bh7wTRhh.js} +8 -8
- package/dist/chunks/{index.B2M9nD1V.js → index.C2XSkjNu.js} +5 -5
- package/dist/chunks/{index.DQboAxJm.js → index.DfqWks-F.js} +2 -1
- package/dist/chunks/{index.CAueP3cK.js → index.DyQPL4DO.js} +200 -945
- package/dist/chunks/{index.68735LiX.js → index.TH3f4LSA.js} +2 -2
- package/dist/chunks/{index.K90BXFOx.js → index.cYxyd29h.js} +12 -12
- package/dist/chunks/{inspector.DKLceBVD.js → inspector.CU9GlB9I.js} +1 -1
- package/dist/chunks/{reporters.Dcdq51WE.d.ts → reporters.Y8BYiXBN.d.ts} +340 -239
- package/dist/chunks/{resolveConfig.kZFMjKCQ.js → resolveConfig.DATSOo7x.js} +150 -65
- package/dist/chunks/{rpc.C3q9uwRX.js → rpc.Bf456uf4.js} +1 -2
- package/dist/chunks/{runBaseTests.URiUrnWK.js → runBaseTests.Ba8jtu6O.js} +8 -8
- package/dist/chunks/{setup-common.D0zLenuv.js → setup-common.jLbIuaww.js} +1 -1
- package/dist/chunks/{RandomSequencer.DB__To1b.js → typechecker.ChNaIV36.js} +62 -115
- package/dist/chunks/{utils.yHKcm4dz.js → utils.DJWL04yX.js} +1 -1
- package/dist/chunks/{vi.Da_PT3Vw.js → vi.CjhMlMwf.js} +6 -6
- package/dist/chunks/{vite.DzluO1Kj.d.ts → vite.CQ0dHgkN.d.ts} +1 -1
- package/dist/chunks/{vm.DrFVeTXo.js → vm.CUw7ChSp.js} +5 -5
- package/dist/chunks/{worker.BIVMnzXw.d.ts → worker.B1y96qmv.d.ts} +1 -1
- package/dist/chunks/{worker.Hz_LAzfd.d.ts → worker.CIpff8Eg.d.ts} +2 -4
- package/dist/cli.js +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +3 -3
- package/dist/config.js +1 -1
- package/dist/coverage.d.ts +1 -1
- package/dist/coverage.js +12 -11
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +17 -118
- package/dist/index.js +2 -2
- package/dist/node.d.ts +11 -8
- package/dist/node.js +27 -25
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +4 -6
- package/dist/runners.d.ts +1 -0
- package/dist/runners.js +10 -10
- package/dist/worker.js +5 -5
- package/dist/workers/forks.js +2 -2
- package/dist/workers/runVmTests.js +7 -7
- package/dist/workers/threads.js +2 -2
- package/dist/workers/vmForks.js +3 -3
- package/dist/workers/vmThreads.js +3 -3
- package/dist/workers.d.ts +2 -2
- package/dist/workers.js +8 -8
- package/package.json +17 -17
- package/dist/chunks/types.BOjykUpq.d.ts +0 -27
|
@@ -28,7 +28,7 @@ function createBirpc(functions, options) {
|
|
|
28
28
|
if (method === "$close")
|
|
29
29
|
return close;
|
|
30
30
|
if (method === "then" && !eventNames.includes("then") && !("then" in functions))
|
|
31
|
-
return
|
|
31
|
+
return undefined;
|
|
32
32
|
const sendEvent = (...args) => {
|
|
33
33
|
post(serialize({ m: method, a: args, t: "q" }));
|
|
34
34
|
};
|
|
@@ -43,7 +43,7 @@ function createBirpc(functions, options) {
|
|
|
43
43
|
try {
|
|
44
44
|
await _promise;
|
|
45
45
|
} finally {
|
|
46
|
-
_promise =
|
|
46
|
+
_promise = undefined;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return new Promise((resolve, reject) => {
|
|
@@ -373,7 +373,7 @@ var happy = {
|
|
|
373
373
|
const { Window } = await import('happy-dom');
|
|
374
374
|
let win = new Window({
|
|
375
375
|
...happyDOM,
|
|
376
|
-
console: console && globalThis.console ? globalThis.console :
|
|
376
|
+
console: console && globalThis.console ? globalThis.console : undefined,
|
|
377
377
|
url: happyDOM.url || "http://localhost:3000",
|
|
378
378
|
settings: {
|
|
379
379
|
...happyDOM.settings,
|
|
@@ -390,7 +390,7 @@ var happy = {
|
|
|
390
390
|
},
|
|
391
391
|
async teardown() {
|
|
392
392
|
await teardownWindow(win);
|
|
393
|
-
win =
|
|
393
|
+
win = undefined;
|
|
394
394
|
}
|
|
395
395
|
};
|
|
396
396
|
},
|
|
@@ -398,7 +398,7 @@ var happy = {
|
|
|
398
398
|
const { Window, GlobalWindow } = await import('happy-dom');
|
|
399
399
|
const win = new (GlobalWindow || Window)({
|
|
400
400
|
...happyDOM,
|
|
401
|
-
console: console && global.console ? global.console :
|
|
401
|
+
console: console && global.console ? global.console : undefined,
|
|
402
402
|
url: happyDOM.url || "http://localhost:3000",
|
|
403
403
|
settings: {
|
|
404
404
|
...happyDOM.settings,
|
|
@@ -466,11 +466,11 @@ var jsdom = {
|
|
|
466
466
|
} = jsdom;
|
|
467
467
|
let dom = new JSDOM(html, {
|
|
468
468
|
pretendToBeVisual,
|
|
469
|
-
resources: resources ?? (userAgent ? new ResourceLoader({ userAgent }) :
|
|
469
|
+
resources: resources ?? (userAgent ? new ResourceLoader({ userAgent }) : undefined),
|
|
470
470
|
runScripts,
|
|
471
471
|
url,
|
|
472
|
-
virtualConsole: console && globalThis.console ? new VirtualConsole().sendTo(globalThis.console) :
|
|
473
|
-
cookieJar: cookieJar ? new CookieJar() :
|
|
472
|
+
virtualConsole: console && globalThis.console ? new VirtualConsole().sendTo(globalThis.console) : undefined,
|
|
473
|
+
cookieJar: cookieJar ? new CookieJar() : undefined,
|
|
474
474
|
includeNodeLocations,
|
|
475
475
|
contentType,
|
|
476
476
|
userAgent,
|
|
@@ -503,7 +503,7 @@ var jsdom = {
|
|
|
503
503
|
teardown() {
|
|
504
504
|
clearWindowErrors();
|
|
505
505
|
dom.window.close();
|
|
506
|
-
dom =
|
|
506
|
+
dom = undefined;
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
509
|
},
|
|
@@ -524,11 +524,11 @@ var jsdom = {
|
|
|
524
524
|
} = jsdom;
|
|
525
525
|
const dom = new JSDOM(html, {
|
|
526
526
|
pretendToBeVisual,
|
|
527
|
-
resources: resources ?? (userAgent ? new ResourceLoader({ userAgent }) :
|
|
527
|
+
resources: resources ?? (userAgent ? new ResourceLoader({ userAgent }) : undefined),
|
|
528
528
|
runScripts,
|
|
529
529
|
url,
|
|
530
|
-
virtualConsole: console && global.console ? new VirtualConsole().sendTo(global.console) :
|
|
531
|
-
cookieJar: cookieJar ? new CookieJar() :
|
|
530
|
+
virtualConsole: console && global.console ? new VirtualConsole().sendTo(global.console) : undefined,
|
|
531
|
+
cookieJar: cookieJar ? new CookieJar() : undefined,
|
|
532
532
|
includeNodeLocations,
|
|
533
533
|
contentType,
|
|
534
534
|
userAgent,
|
|
@@ -633,8 +633,8 @@ var node = {
|
|
|
633
633
|
return context;
|
|
634
634
|
},
|
|
635
635
|
teardown() {
|
|
636
|
-
context =
|
|
637
|
-
global =
|
|
636
|
+
context = undefined;
|
|
637
|
+
global = undefined;
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
640
|
},
|
|
@@ -9,7 +9,7 @@ function setupInspect(ctx) {
|
|
|
9
9
|
const isEnabled = config.inspector.enabled;
|
|
10
10
|
if (isEnabled) {
|
|
11
11
|
inspector = __require("node:inspector");
|
|
12
|
-
const isOpen = inspector.url() !==
|
|
12
|
+
const isOpen = inspector.url() !== undefined;
|
|
13
13
|
if (!isOpen) {
|
|
14
14
|
inspector.open(
|
|
15
15
|
config.inspector.port,
|