vitest 0.18.1 → 0.20.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 +5 -5
- package/dist/browser.d.ts +1890 -0
- package/dist/browser.mjs +22 -0
- package/dist/{chunk-api-setup.9d3f7670.mjs → chunk-api-setup.7c4c8879.mjs} +24 -6
- package/dist/{chunk-constants.d4406290.mjs → chunk-constants.16825f0c.mjs} +5 -4
- package/dist/{chunk-env-node.bbba78e5.mjs → chunk-defaults.1c51d585.mjs} +461 -457
- package/dist/{chunk-install-pkg.2dcb2c04.mjs → chunk-install-pkg.6c6dc0c2.mjs} +11 -10
- package/dist/chunk-integrations-globals.56a11010.mjs +26 -0
- package/dist/{chunk-utils-global.0a7416cf.mjs → chunk-mock-date.9160e13b.mjs} +16 -41
- package/dist/chunk-node-git.43dbdd42.mjs +1139 -0
- package/dist/chunk-runtime-chain.b6c2cdbc.mjs +2041 -0
- package/dist/chunk-runtime-error.0aa0dc06.mjs +648 -0
- package/dist/{chunk-runtime-chain.b60d57da.mjs → chunk-runtime-hooks.3ee34848.mjs} +14 -2014
- package/dist/{chunk-runtime-mocker.1d853e3a.mjs → chunk-runtime-mocker.0a8f7c5e.mjs} +23 -17
- package/dist/{chunk-runtime-rpc.9d1f4c48.mjs → chunk-runtime-rpc.dbf0b31d.mjs} +3 -1
- package/dist/chunk-utils-global.fa20c2f6.mjs +5 -0
- package/dist/{chunk-utils-source-map.c03f8bc4.mjs → chunk-utils-source-map.8198ebd9.mjs} +2 -2
- package/dist/chunk-utils-timers.b48455ed.mjs +27 -0
- package/dist/chunk-vite-node-client.a247c2c2.mjs +320 -0
- package/dist/chunk-vite-node-debug.c5887932.mjs +76 -0
- package/dist/{chunk-vite-node-externalize.6956d2d9.mjs → chunk-vite-node-externalize.2e90dadf.mjs} +165 -1182
- package/dist/{chunk-vite-node-utils.8077cd3c.mjs → chunk-vite-node-utils.9dfd1e3f.mjs} +4 -312
- package/dist/cli.mjs +10 -10
- package/dist/config.cjs +6 -3
- package/dist/config.d.ts +2 -0
- package/dist/config.mjs +6 -3
- package/dist/entry.mjs +17 -598
- package/dist/index.d.ts +81 -6
- package/dist/index.mjs +10 -5
- package/dist/loader.mjs +35 -0
- package/dist/node.d.ts +71 -4
- package/dist/node.mjs +13 -12
- package/dist/suite.mjs +15 -0
- package/dist/vendor-index.61438b77.mjs +335 -0
- package/dist/{vendor-index.4bf9c627.mjs → vendor-index.62ce5c33.mjs} +11 -343
- package/dist/worker.mjs +9 -6
- package/package.json +12 -4
- package/dist/chunk-integrations-globals.00b6e1ad.mjs +0 -23
package/dist/browser.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { c as createExpect, d as describe, b as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.b6c2cdbc.mjs';
|
|
2
|
+
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach } from './chunk-runtime-hooks.3ee34848.mjs';
|
|
3
|
+
export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-error.0aa0dc06.mjs';
|
|
4
|
+
import * as chai from 'chai';
|
|
5
|
+
export { chai };
|
|
6
|
+
export { assert, should } from 'chai';
|
|
7
|
+
import 'util';
|
|
8
|
+
import './chunk-mock-date.9160e13b.mjs';
|
|
9
|
+
import 'path';
|
|
10
|
+
import 'tty';
|
|
11
|
+
import 'local-pkg';
|
|
12
|
+
import './vendor-_commonjsHelpers.4da45ef5.mjs';
|
|
13
|
+
import './chunk-runtime-rpc.dbf0b31d.mjs';
|
|
14
|
+
import './chunk-utils-global.fa20c2f6.mjs';
|
|
15
|
+
import './chunk-utils-timers.b48455ed.mjs';
|
|
16
|
+
import 'fs';
|
|
17
|
+
import './chunk-utils-source-map.8198ebd9.mjs';
|
|
18
|
+
import './spy.mjs';
|
|
19
|
+
import 'tinyspy';
|
|
20
|
+
import './chunk-defaults.1c51d585.mjs';
|
|
21
|
+
import 'module';
|
|
22
|
+
import 'url';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import { c as createBirpc } from './chunk-vite-node-
|
|
2
|
+
import { c as createBirpc } from './chunk-vite-node-client.a247c2c2.mjs';
|
|
3
3
|
import require$$0$1 from 'stream';
|
|
4
4
|
import require$$0 from 'zlib';
|
|
5
5
|
import require$$3 from 'net';
|
|
@@ -8,15 +8,16 @@ import require$$5 from 'crypto';
|
|
|
8
8
|
import require$$2 from 'events';
|
|
9
9
|
import require$$1 from 'https';
|
|
10
10
|
import require$$2$1 from 'http';
|
|
11
|
-
import
|
|
12
|
-
import { A as API_PATH } from './chunk-constants.
|
|
13
|
-
import { j as interpretSourcePos,
|
|
11
|
+
import _url from 'url';
|
|
12
|
+
import { A as API_PATH } from './chunk-constants.16825f0c.mjs';
|
|
13
|
+
import { j as interpretSourcePos, p as parseStacktrace } from './chunk-utils-source-map.8198ebd9.mjs';
|
|
14
14
|
import 'module';
|
|
15
15
|
import 'vm';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-mock-date.9160e13b.mjs';
|
|
17
17
|
import 'path';
|
|
18
18
|
import 'tty';
|
|
19
19
|
import 'local-pkg';
|
|
20
|
+
import './chunk-vite-node-utils.9dfd1e3f.mjs';
|
|
20
21
|
import 'assert';
|
|
21
22
|
import 'util';
|
|
22
23
|
import 'debug';
|
|
@@ -2513,7 +2514,7 @@ const http$1 = require$$2$1;
|
|
|
2513
2514
|
const net = require$$3;
|
|
2514
2515
|
const tls = require$$4;
|
|
2515
2516
|
const { randomBytes, createHash: createHash$1 } = require$$5;
|
|
2516
|
-
const { URL: URL$1 } =
|
|
2517
|
+
const { URL: URL$1 } = _url;
|
|
2517
2518
|
|
|
2518
2519
|
const PerMessageDeflate$1 = permessageDeflate;
|
|
2519
2520
|
const Receiver = receiver;
|
|
@@ -4417,9 +4418,26 @@ function setup(ctx) {
|
|
|
4417
4418
|
});
|
|
4418
4419
|
function setupClient(ws) {
|
|
4419
4420
|
const rpc = createBirpc({
|
|
4421
|
+
async onWatcherStart() {
|
|
4422
|
+
await ctx.report("onWatcherStart");
|
|
4423
|
+
},
|
|
4424
|
+
async onFinished() {
|
|
4425
|
+
await ctx.report("onFinished");
|
|
4426
|
+
},
|
|
4427
|
+
async onCollected(files) {
|
|
4428
|
+
ctx.state.collectFiles(files);
|
|
4429
|
+
await ctx.report("onCollected", files);
|
|
4430
|
+
},
|
|
4431
|
+
async onTaskUpdate(packs) {
|
|
4432
|
+
ctx.state.updateTasks(packs);
|
|
4433
|
+
await ctx.report("onTaskUpdate", packs);
|
|
4434
|
+
},
|
|
4420
4435
|
getFiles() {
|
|
4421
4436
|
return ctx.state.getFiles();
|
|
4422
4437
|
},
|
|
4438
|
+
async getPaths() {
|
|
4439
|
+
return await ctx.state.getPaths();
|
|
4440
|
+
},
|
|
4423
4441
|
readFile(id) {
|
|
4424
4442
|
return promises.readFile(id, "utf-8");
|
|
4425
4443
|
},
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import _url from 'url';
|
|
2
|
+
import { y as resolve } from './chunk-mock-date.9160e13b.mjs';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const rootDir = resolve(_url.fileURLToPath(import.meta.url), "../../");
|
|
5
|
+
const distDir = resolve(_url.fileURLToPath(import.meta.url), "../../dist");
|
|
5
6
|
const defaultPort = 51204;
|
|
6
7
|
const API_PATH = "/__vitest_api__";
|
|
7
8
|
const configFiles = [
|
|
@@ -34,4 +35,4 @@ const globalApis = [
|
|
|
34
35
|
"afterEach"
|
|
35
36
|
];
|
|
36
37
|
|
|
37
|
-
export { API_PATH as A, defaultPort as a, configFiles as c, distDir as d, globalApis as g };
|
|
38
|
+
export { API_PATH as A, defaultPort as a, configFiles as c, distDir as d, globalApis as g, rootDir as r };
|