vitest 0.24.4 → 0.25.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/LICENSE.md +286 -57
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +17 -9
- package/dist/{chunk-api-setup.5a197c69.js → chunk-api-setup.a13c5f9d.js} +38 -19
- package/dist/{chunk-install-pkg.22707ee4.js → chunk-install-pkg.55bfe508.js} +4 -5
- package/dist/{chunk-integrations-coverage.cca09977.js → chunk-integrations-coverage.befed097.js} +57 -1
- package/dist/chunk-integrations-globals.391b3839.js +25 -0
- package/dist/{chunk-node-git.82174cfe.js → chunk-node-git.af5c9d73.js} +5 -6
- package/dist/{chunk-runtime-chain.a5cd236b.js → chunk-runtime-chain.3b531731.js} +27 -23
- package/dist/chunk-runtime-error.3cc15c6f.js +142 -0
- package/dist/{chunk-runtime-mocker.f994e23a.js → chunk-runtime-mocker.a5d87666.js} +4 -4
- package/dist/chunk-runtime-rpc.4a2d45ab.js +30 -0
- package/dist/chunk-runtime-setup.f644ac4c.js +1350 -0
- package/dist/{chunk-runtime-hooks.66004497.js → chunk-runtime-test-state.31ce8643.js} +106 -6
- package/dist/{chunk-mock-date.9fe2b438.js → chunk-typecheck-constants.410fa7b2.js} +23 -4
- package/dist/{chunk-utils-env.b1281522.js → chunk-utils-env.7fe285cc.js} +2 -0
- package/dist/chunk-utils-source-map.1a66263d.js +90 -0
- package/dist/{chunk-utils-source-map.d9d36eb0.js → chunk-utils-timers.d1fcc6bb.js} +309 -3722
- package/dist/{chunk-vite-node-client.9fbd5d5b.js → chunk-vite-node-client.13ea0a59.js} +25 -5
- package/dist/{chunk-vite-node-externalize.e66d46f6.js → chunk-vite-node-externalize.01d0d22c.js} +824 -97
- package/dist/chunk-vite-node-utils.b89230f3.js +1400 -0
- package/dist/cli-wrapper.js +5 -6
- package/dist/cli.js +27 -13
- package/dist/config.cjs +6 -1
- package/dist/config.d.ts +6 -1
- package/dist/config.js +6 -1
- package/dist/entry.js +11 -9
- package/dist/environments.d.ts +1 -1
- package/dist/index-b68b3c09.d.ts +256 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -7
- package/dist/loader.js +4 -3
- package/dist/node.d.ts +2 -2
- package/dist/node.js +18 -11
- package/dist/suite.js +6 -6
- package/dist/{global-58e8e951.d.ts → types-b3ff5eea.d.ts} +215 -18
- package/dist/{vendor-index.cc8d244b.js → vendor-index.16d769d7.js} +1 -2
- package/dist/{vendor-index.12d51d29.js → vendor-index.22806ffb.js} +279 -7
- package/dist/{vendor-index.9c919048.js → vendor-index.808a85a6.js} +0 -0
- package/dist/worker.js +11 -8
- package/globals.d.ts +2 -0
- package/package.json +13 -9
- package/dist/chunk-integrations-globals.88fd2e64.js +0 -25
- package/dist/chunk-runtime-error.9c28c08f.js +0 -807
- package/dist/chunk-runtime-rpc.e583f5e7.js +0 -16
- package/dist/chunk-utils-timers.ab764c0c.js +0 -27
- package/dist/chunk-vite-node-utils.5096a80d.js +0 -6952
- package/dist/index-220c1d70.d.ts +0 -117
- package/dist/vendor-index.1a291e86.js +0 -275
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { g as getWorkerState } from './chunk-mock-date.9fe2b438.js';
|
|
2
|
-
import { w as withSafeTimers } from './chunk-utils-timers.ab764c0c.js';
|
|
3
|
-
|
|
4
|
-
const rpc = () => {
|
|
5
|
-
const { rpc: rpc2 } = getWorkerState();
|
|
6
|
-
return new Proxy(rpc2, {
|
|
7
|
-
get(target, p, handler) {
|
|
8
|
-
const sendCall = Reflect.get(target, p, handler);
|
|
9
|
-
const safeSendCall = (...args) => withSafeTimers(() => sendCall(...args));
|
|
10
|
-
safeSendCall.asEvent = sendCall.asEvent;
|
|
11
|
-
return safeSendCall;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { rpc as r };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const {
|
|
2
|
-
setTimeout: safeSetTimeout,
|
|
3
|
-
setInterval: safeSetInterval,
|
|
4
|
-
clearInterval: safeClearInterval,
|
|
5
|
-
clearTimeout: safeClearTimeout
|
|
6
|
-
} = globalThis;
|
|
7
|
-
function withSafeTimers(fn) {
|
|
8
|
-
const currentSetTimeout = globalThis.setTimeout;
|
|
9
|
-
const currentSetInterval = globalThis.setInterval;
|
|
10
|
-
const currentClearInterval = globalThis.clearInterval;
|
|
11
|
-
const currentClearTimeout = globalThis.clearTimeout;
|
|
12
|
-
try {
|
|
13
|
-
globalThis.setTimeout = safeSetTimeout;
|
|
14
|
-
globalThis.setInterval = safeSetInterval;
|
|
15
|
-
globalThis.clearInterval = safeClearInterval;
|
|
16
|
-
globalThis.clearTimeout = safeClearTimeout;
|
|
17
|
-
const result = fn();
|
|
18
|
-
return result;
|
|
19
|
-
} finally {
|
|
20
|
-
globalThis.setTimeout = currentSetTimeout;
|
|
21
|
-
globalThis.setInterval = currentSetInterval;
|
|
22
|
-
globalThis.clearInterval = currentClearInterval;
|
|
23
|
-
globalThis.clearTimeout = currentClearTimeout;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { safeClearTimeout as a, safeSetInterval as b, safeClearInterval as c, safeSetTimeout as s, withSafeTimers as w };
|