vitest 1.3.1 → 1.5.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 +4 -1
- package/dist/browser.js +1 -1
- package/dist/chunks/{integrations-globals.THajbSRg.js → integrations-globals.2J_Aii2q.js} +4 -4
- package/dist/chunks/{runtime-console.Iloo9fIt.js → runtime-console.kbFEN7E-.js} +16 -8
- package/dist/chunks/{runtime-runBaseTests.9RbsHRbU.js → runtime-runBaseTests.3fVSWBsC.js} +12 -10
- package/dist/cli-wrapper.js +1 -1
- package/dist/cli.js +7 -7
- package/dist/config.cjs +1 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -0
- 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 +7 -7
- package/dist/{reporters-MmQN-57K.d.ts → reporters-LqC_WI4d.d.ts} +233 -173
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +4 -4
- package/dist/runners.d.ts +2 -1
- package/dist/runners.js +10 -5
- package/dist/{suite-UrZdHRff.d.ts → suite-ynYMzeLu.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.Z38YsPLm.js → base.BjeeYg4o.js} +2 -2
- package/dist/vendor/{base.N3JkKp7j.js → base.Xt0Omgh7.js} +9 -3
- package/dist/vendor/{cac.wWT9ELdg.js → cac.qnW6GNL2.js} +258 -129
- package/dist/vendor/{constants.K-Wf1PUy.js → constants.5J7I254_.js} +2 -1
- package/dist/vendor/{execute.27Kk4lQF.js → execute.2_yoIC01.js} +1 -1
- package/dist/vendor/{index.9hqYxJUw.js → index.-ITFwqG_.js} +1 -1
- package/dist/vendor/{index.JZMafwT-.js → index.12jbrDSD.js} +1 -1
- package/dist/vendor/{index.c1V_jzyZ.js → index.kSaPvGW6.js} +69 -26
- package/dist/vendor/inspector.IgLX3ur5.js +54 -0
- package/dist/vendor/{setup-common.snyQUvE3.js → setup-common.A1De6efh.js} +8 -1
- package/dist/vendor/utils.0uYuCbzo.js +49 -0
- package/dist/vendor/{vi.C5mroSoP.js → vi.Fxjax7rQ.js} +37 -21
- package/dist/vendor/{vm.o1IruPAo.js → vm.I_IsyNig.js} +3 -3
- package/dist/worker.js +4 -26
- package/dist/workers/forks.js +5 -5
- package/dist/workers/runVmTests.js +11 -5
- package/dist/workers/threads.js +4 -4
- package/dist/workers/vmForks.js +10 -10
- package/dist/workers/vmThreads.js +9 -9
- package/dist/workers.d.ts +6 -3
- package/dist/workers.js +10 -9
- package/package.json +12 -12
- package/dist/vendor/utils.GbToHGHI.js +0 -41
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModuleCacheMap } from 'vite-node/client';
|
|
2
2
|
import { p as provideWorkerState } from './global.CkGT_TMy.js';
|
|
3
|
-
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.
|
|
3
|
+
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.2_yoIC01.js';
|
|
4
4
|
|
|
5
5
|
let _viteNode;
|
|
6
6
|
const moduleCache = new ModuleCacheMap();
|
|
@@ -25,7 +25,7 @@ async function runBaseTests(state) {
|
|
|
25
25
|
ctx.files.forEach((i) => state.moduleCache.delete(i));
|
|
26
26
|
const [executor, { run }] = await Promise.all([
|
|
27
27
|
startViteNode({ state, requestStubs: getDefaultRequestStubs() }),
|
|
28
|
-
import('../chunks/runtime-runBaseTests.
|
|
28
|
+
import('../chunks/runtime-runBaseTests.3fVSWBsC.js')
|
|
29
29
|
]);
|
|
30
30
|
await run(
|
|
31
31
|
ctx.files,
|
|
@@ -21,13 +21,13 @@ function getAllMockableProperties(obj, isModule, constructors) {
|
|
|
21
21
|
Map,
|
|
22
22
|
Object: Object2,
|
|
23
23
|
Function,
|
|
24
|
-
RegExp,
|
|
24
|
+
RegExp: RegExp2,
|
|
25
25
|
Array: Array2
|
|
26
26
|
} = constructors;
|
|
27
27
|
const allProps = new Map();
|
|
28
28
|
let curr = obj;
|
|
29
29
|
do {
|
|
30
|
-
if (curr === Object2.prototype || curr === Function.prototype || curr ===
|
|
30
|
+
if (curr === Object2.prototype || curr === Function.prototype || curr === RegExp2.prototype)
|
|
31
31
|
break;
|
|
32
32
|
collectOwnProperties(curr, (key) => {
|
|
33
33
|
const descriptor = Object2.getOwnPropertyDescriptor(curr, key);
|
|
@@ -101,5 +101,11 @@ function setProcessTitle(title) {
|
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
function escapeRegExp(s) {
|
|
105
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
106
|
+
}
|
|
107
|
+
function wildcardPatternToRegExp(pattern) {
|
|
108
|
+
return new RegExp(`^${pattern.split("*").map(escapeRegExp).join(".*")}$`, "i");
|
|
109
|
+
}
|
|
104
110
|
|
|
105
|
-
export { AggregateErrorPonyfill as A, slash as a, isPrimitive as b, groupBy as c, deepMerge as d, stdout as e, getAllMockableProperties as g, isChildProcess as i, noop as n, setProcessTitle as s, toArray as t };
|
|
111
|
+
export { AggregateErrorPonyfill as A, slash as a, isPrimitive as b, groupBy as c, deepMerge as d, stdout as e, getAllMockableProperties as g, isChildProcess as i, noop as n, setProcessTitle as s, toArray as t, wildcardPatternToRegExp as w };
|