vitest 0.0.68 → 0.0.69
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/bin/vitest.mjs +3 -3
- package/dist/cli.js +3859 -0
- package/dist/constants-d4c70610.js +25 -0
- package/dist/entry.js +3330 -0
- package/dist/global-e40b54d6.js +16 -0
- package/dist/index-6427e0f2.js +12 -0
- package/dist/index-e37648e9.js +31 -0
- package/dist/index.d.ts +304 -5
- package/dist/index.js +5 -46
- package/dist/{chunk-ANPMHBIF.js → suite-819c135e.js} +16 -45
- package/dist/{chunk-5TNYWP3O.js → utils-9dcc4050.js} +1 -18
- package/dist/{runtime/worker.js → worker.js} +30 -48
- package/package.json +11 -5
- package/dist/chunk-APGELTDH.js +0 -19
- package/dist/chunk-R2SMNEBL.js +0 -95
- package/dist/chunk-VLGIKNLC.js +0 -78
- package/dist/chunk-XUIDSY4V.js +0 -35
- package/dist/chunk-YPKHVZRP.js +0 -86
- package/dist/global-PRFYLY7P.js +0 -22
- package/dist/node/cli.d.ts +0 -1
- package/dist/node/cli.js +0 -2612
- package/dist/options-63a726fa.d.ts +0 -294
- package/dist/runtime/entry.d.ts +0 -7
- package/dist/runtime/entry.js +0 -2545
- package/dist/runtime/worker.d.ts +0 -23
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
nanoid
|
|
9
|
-
} from "../chunk-APGELTDH.js";
|
|
10
|
-
import {
|
|
11
|
-
init_esm_shims
|
|
12
|
-
} from "../chunk-R2SMNEBL.js";
|
|
1
|
+
import { resolve, dirname } from 'path';
|
|
2
|
+
import { n as nanoid } from './index-6427e0f2.js';
|
|
3
|
+
import { b as distDir } from './constants-d4c70610.js';
|
|
4
|
+
import { builtinModules, createRequire } from 'module';
|
|
5
|
+
import { pathToFileURL, fileURLToPath } from 'url';
|
|
6
|
+
import vm from 'vm';
|
|
7
|
+
import { s as slash } from './utils-9dcc4050.js';
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
init_esm_shims();
|
|
16
|
-
import { resolve as resolve2 } from "path";
|
|
17
|
-
|
|
18
|
-
// src/node/execute.ts
|
|
19
|
-
init_esm_shims();
|
|
20
|
-
import { builtinModules, createRequire } from "module";
|
|
21
|
-
import { fileURLToPath, pathToFileURL } from "url";
|
|
22
|
-
import { dirname, resolve } from "path";
|
|
23
|
-
import vm from "vm";
|
|
24
|
-
var defaultInline = [
|
|
9
|
+
const defaultInline = [
|
|
25
10
|
"vitest/dist",
|
|
26
11
|
"@vue",
|
|
27
12
|
"@vueuse",
|
|
@@ -32,11 +17,11 @@ var defaultInline = [
|
|
|
32
17
|
/\/esm\/.*\.js$/,
|
|
33
18
|
/\.(es|esm|esm-browser|esm-bundler|es6).js$/
|
|
34
19
|
];
|
|
35
|
-
|
|
20
|
+
const depsExternal = [
|
|
36
21
|
/\.cjs.js$/
|
|
37
22
|
];
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
const isWindows = process.platform === "win32";
|
|
24
|
+
const stubRequests = {
|
|
40
25
|
"/@vite/client": {
|
|
41
26
|
injectQuery: (id) => id,
|
|
42
27
|
createHotContext() {
|
|
@@ -69,7 +54,7 @@ async function interpretedImport(path, interpretDefault) {
|
|
|
69
54
|
return mod;
|
|
70
55
|
}
|
|
71
56
|
async function executeInViteNode(options) {
|
|
72
|
-
const { moduleCache
|
|
57
|
+
const { moduleCache, root, files, fetch } = options;
|
|
73
58
|
const externaled = new Set(builtinModules);
|
|
74
59
|
const result = [];
|
|
75
60
|
for (const file of files)
|
|
@@ -81,11 +66,11 @@ async function executeInViteNode(options) {
|
|
|
81
66
|
var _a;
|
|
82
67
|
if (callstack.includes(dep)) {
|
|
83
68
|
const cacheKey = toFilePath(dep, root);
|
|
84
|
-
if (!((_a =
|
|
69
|
+
if (!((_a = moduleCache.get(cacheKey)) == null ? void 0 : _a.exports))
|
|
85
70
|
throw new Error(`Circular dependency detected
|
|
86
71
|
Stack:
|
|
87
72
|
${[...callstack, dep].reverse().map((p) => `- ${p}`).join("\n")}`);
|
|
88
|
-
return
|
|
73
|
+
return moduleCache.get(cacheKey).exports;
|
|
89
74
|
}
|
|
90
75
|
return cachedRequest(dep, callstack);
|
|
91
76
|
};
|
|
@@ -97,11 +82,11 @@ ${[...callstack, dep].reverse().map((p) => `- ${p}`).join("\n")}`);
|
|
|
97
82
|
const url = pathToFileURL(fsPath).href;
|
|
98
83
|
const exports = {};
|
|
99
84
|
setCache(fsPath, { transformResult: result2, exports });
|
|
100
|
-
const
|
|
85
|
+
const __filename = fileURLToPath(url);
|
|
101
86
|
const context = {
|
|
102
87
|
require: createRequire(url),
|
|
103
|
-
__filename
|
|
104
|
-
__dirname: dirname(
|
|
88
|
+
__filename,
|
|
89
|
+
__dirname: dirname(__filename),
|
|
105
90
|
__vite_ssr_import__: request,
|
|
106
91
|
__vite_ssr_dynamic_import__: request,
|
|
107
92
|
__vite_ssr_exports__: exports,
|
|
@@ -117,10 +102,10 @@ ${[...callstack, dep].reverse().map((p) => `- ${p}`).join("\n")}`);
|
|
|
117
102
|
return exports;
|
|
118
103
|
}
|
|
119
104
|
function setCache(id, mod) {
|
|
120
|
-
if (!
|
|
121
|
-
|
|
105
|
+
if (!moduleCache.has(id))
|
|
106
|
+
moduleCache.set(id, mod);
|
|
122
107
|
else
|
|
123
|
-
Object.assign(
|
|
108
|
+
Object.assign(moduleCache.get(id), mod);
|
|
124
109
|
}
|
|
125
110
|
async function cachedRequest(rawId, callstack) {
|
|
126
111
|
var _a, _b;
|
|
@@ -133,8 +118,8 @@ ${[...callstack, dep].reverse().map((p) => `- ${p}`).join("\n")}`);
|
|
|
133
118
|
externaled.add(importPath);
|
|
134
119
|
return interpretedImport(importPath, options.interpretDefault);
|
|
135
120
|
}
|
|
136
|
-
if ((_a =
|
|
137
|
-
return (_b =
|
|
121
|
+
if ((_a = moduleCache.get(fsPath)) == null ? void 0 : _a.promise)
|
|
122
|
+
return (_b = moduleCache.get(fsPath)) == null ? void 0 : _b.promise;
|
|
138
123
|
const promise = directRequest(id, fsPath, callstack);
|
|
139
124
|
setCache(fsPath, { promise });
|
|
140
125
|
return await promise;
|
|
@@ -204,9 +189,8 @@ function patchWindowsImportPath(path) {
|
|
|
204
189
|
return path;
|
|
205
190
|
}
|
|
206
191
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
var moduleCache = /* @__PURE__ */ new Map();
|
|
192
|
+
let _run;
|
|
193
|
+
const moduleCache = new Map();
|
|
210
194
|
async function init(ctx) {
|
|
211
195
|
if (_run)
|
|
212
196
|
return _run;
|
|
@@ -214,7 +198,7 @@ async function init(ctx) {
|
|
|
214
198
|
_run = (await executeInViteNode({
|
|
215
199
|
root: config.root,
|
|
216
200
|
files: [
|
|
217
|
-
|
|
201
|
+
resolve(distDir, "entry.js")
|
|
218
202
|
],
|
|
219
203
|
fetch(id) {
|
|
220
204
|
return process.__vitest_worker__.rpc("fetch", id);
|
|
@@ -229,13 +213,13 @@ async function init(ctx) {
|
|
|
229
213
|
async function run(ctx) {
|
|
230
214
|
process.stdout.write("\0");
|
|
231
215
|
const { config, port } = ctx;
|
|
232
|
-
const rpcPromiseMap =
|
|
216
|
+
const rpcPromiseMap = new Map();
|
|
233
217
|
process.__vitest_worker__ = {
|
|
234
218
|
config,
|
|
235
219
|
rpc: (method, ...args) => {
|
|
236
|
-
return new Promise((
|
|
220
|
+
return new Promise((resolve2, reject) => {
|
|
237
221
|
const id = nanoid();
|
|
238
|
-
rpcPromiseMap.set(id, { resolve:
|
|
222
|
+
rpcPromiseMap.set(id, { resolve: resolve2, reject });
|
|
239
223
|
port.postMessage({ method, args, id });
|
|
240
224
|
});
|
|
241
225
|
},
|
|
@@ -258,7 +242,5 @@ async function run(ctx) {
|
|
|
258
242
|
ctx.files.forEach((i) => moduleCache.delete(i));
|
|
259
243
|
return run2(ctx.files, ctx.config);
|
|
260
244
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
init
|
|
264
|
-
};
|
|
245
|
+
|
|
246
|
+
export { run as default, init };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
4
4
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"*.d.ts"
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
|
-
"build": "
|
|
42
|
+
"build": "rimraf dist && rollup -c",
|
|
43
43
|
"coverage": "node bin/vitest.mjs -r test/core --coverage",
|
|
44
|
-
"dev": "
|
|
44
|
+
"dev": "rollup -c -w src",
|
|
45
45
|
"docs": "npm -C docs run dev",
|
|
46
46
|
"docs:build": "npm -C docs run build",
|
|
47
47
|
"docs:serve": "npm -C docs run serve",
|
|
@@ -60,17 +60,21 @@
|
|
|
60
60
|
"chai": "^4.3.4",
|
|
61
61
|
"chai-subset": "^1.6.0",
|
|
62
62
|
"fast-glob": "^3.2.7",
|
|
63
|
-
"log-update": "^5.0.0",
|
|
64
63
|
"micromatch": "^4.0.4",
|
|
65
|
-
"picocolors": "^1.0.0",
|
|
66
64
|
"piscina": "^3.2.0",
|
|
67
65
|
"sinon": "^12.0.1",
|
|
68
66
|
"sinon-chai": "^3.7.0",
|
|
69
67
|
"source-map": "^0.7.3"
|
|
70
68
|
},
|
|
71
69
|
"devDependencies": {
|
|
70
|
+
"log-update": "^5.0.0",
|
|
71
|
+
"picocolors": "^1.0.0",
|
|
72
72
|
"@antfu/eslint-config": "^0.13.1",
|
|
73
73
|
"@antfu/ni": "^0.12.0",
|
|
74
|
+
"@rollup/plugin-alias": "^3.1.8",
|
|
75
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
76
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
77
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
74
78
|
"@types/chai-subset": "^1.3.3",
|
|
75
79
|
"@types/diff": "^5.0.1",
|
|
76
80
|
"@types/jsdom": "^16.2.13",
|
|
@@ -95,6 +99,8 @@
|
|
|
95
99
|
"npm-run-all": "^4.1.5",
|
|
96
100
|
"pretty-format": "^27.4.2",
|
|
97
101
|
"rimraf": "^3.0.2",
|
|
102
|
+
"rollup-plugin-dts": "^4.0.1",
|
|
103
|
+
"rollup-plugin-esbuild": "^4.7.2",
|
|
98
104
|
"strip-ansi": "^7.0.1",
|
|
99
105
|
"tsup": "^5.11.1",
|
|
100
106
|
"typescript": "^4.5.3",
|
package/dist/chunk-APGELTDH.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
init_esm_shims
|
|
3
|
-
} from "./chunk-R2SMNEBL.js";
|
|
4
|
-
|
|
5
|
-
// node_modules/.pnpm/nanoid@3.1.30/node_modules/nanoid/non-secure/index.js
|
|
6
|
-
init_esm_shims();
|
|
7
|
-
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
8
|
-
var nanoid = (size = 21) => {
|
|
9
|
-
let id = "";
|
|
10
|
-
let i = size;
|
|
11
|
-
while (i--) {
|
|
12
|
-
id += urlAlphabet[Math.random() * 64 | 0];
|
|
13
|
-
}
|
|
14
|
-
return id;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
nanoid
|
|
19
|
-
};
|
package/dist/chunk-R2SMNEBL.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
|
-
var __esm = (fn, res) => function __init() {
|
|
26
|
-
return fn && (res = (0, fn[Object.keys(fn)[0]])(fn = 0)), res;
|
|
27
|
-
};
|
|
28
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
29
|
-
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
30
|
-
};
|
|
31
|
-
var __export = (target, all) => {
|
|
32
|
-
__markAsModule(target);
|
|
33
|
-
for (var name in all)
|
|
34
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
35
|
-
};
|
|
36
|
-
var __reExport = (target, module, desc) => {
|
|
37
|
-
if (module && typeof module === "object" || typeof module === "function") {
|
|
38
|
-
for (let key of __getOwnPropNames(module))
|
|
39
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
40
|
-
__defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
|
|
41
|
-
}
|
|
42
|
-
return target;
|
|
43
|
-
};
|
|
44
|
-
var __toModule = (module) => {
|
|
45
|
-
return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
|
|
46
|
-
};
|
|
47
|
-
var __accessCheck = (obj, member, msg) => {
|
|
48
|
-
if (!member.has(obj))
|
|
49
|
-
throw TypeError("Cannot " + msg);
|
|
50
|
-
};
|
|
51
|
-
var __privateGet = (obj, member, getter) => {
|
|
52
|
-
__accessCheck(obj, member, "read from private field");
|
|
53
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
54
|
-
};
|
|
55
|
-
var __privateAdd = (obj, member, value) => {
|
|
56
|
-
if (member.has(obj))
|
|
57
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
58
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
59
|
-
};
|
|
60
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
61
|
-
__accessCheck(obj, member, "write to private field");
|
|
62
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
63
|
-
return value;
|
|
64
|
-
};
|
|
65
|
-
var __privateWrapper = (obj, member, setter, getter) => {
|
|
66
|
-
return {
|
|
67
|
-
set _(value) {
|
|
68
|
-
__privateSet(obj, member, value, setter);
|
|
69
|
-
},
|
|
70
|
-
get _() {
|
|
71
|
-
return __privateGet(obj, member, getter);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// node_modules/.pnpm/tsup@5.11.1_typescript@4.5.3/node_modules/tsup/assets/esm_shims.js
|
|
77
|
-
import { fileURLToPath } from "url";
|
|
78
|
-
import path from "path";
|
|
79
|
-
var init_esm_shims = __esm({
|
|
80
|
-
"node_modules/.pnpm/tsup@5.11.1_typescript@4.5.3/node_modules/tsup/assets/esm_shims.js"() {
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
__spreadValues,
|
|
86
|
-
__spreadProps,
|
|
87
|
-
__commonJS,
|
|
88
|
-
__export,
|
|
89
|
-
__toModule,
|
|
90
|
-
__privateGet,
|
|
91
|
-
__privateAdd,
|
|
92
|
-
__privateSet,
|
|
93
|
-
__privateWrapper,
|
|
94
|
-
init_esm_shims
|
|
95
|
-
};
|
package/dist/chunk-VLGIKNLC.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
init_esm_shims
|
|
3
|
-
} from "./chunk-R2SMNEBL.js";
|
|
4
|
-
|
|
5
|
-
// src/integrations/snapshot/port/jest-test-result-helper.ts
|
|
6
|
-
init_esm_shims();
|
|
7
|
-
var emptySummary = (options) => {
|
|
8
|
-
const summary = {
|
|
9
|
-
added: 0,
|
|
10
|
-
failure: false,
|
|
11
|
-
filesAdded: 0,
|
|
12
|
-
filesRemoved: 0,
|
|
13
|
-
filesRemovedList: [],
|
|
14
|
-
filesUnmatched: 0,
|
|
15
|
-
filesUpdated: 0,
|
|
16
|
-
matched: 0,
|
|
17
|
-
total: 0,
|
|
18
|
-
unchecked: 0,
|
|
19
|
-
uncheckedKeysByFile: [],
|
|
20
|
-
unmatched: 0,
|
|
21
|
-
updated: 0,
|
|
22
|
-
didUpdate: options.updateSnapshot === "all"
|
|
23
|
-
};
|
|
24
|
-
return summary;
|
|
25
|
-
};
|
|
26
|
-
var packSnapshotState = (filepath, state) => {
|
|
27
|
-
const snapshot = {
|
|
28
|
-
filepath,
|
|
29
|
-
added: 0,
|
|
30
|
-
fileDeleted: false,
|
|
31
|
-
matched: 0,
|
|
32
|
-
unchecked: 0,
|
|
33
|
-
uncheckedKeys: [],
|
|
34
|
-
unmatched: 0,
|
|
35
|
-
updated: 0
|
|
36
|
-
};
|
|
37
|
-
const uncheckedCount = state.getUncheckedCount();
|
|
38
|
-
const uncheckedKeys = state.getUncheckedKeys();
|
|
39
|
-
if (uncheckedCount)
|
|
40
|
-
state.removeUncheckedKeys();
|
|
41
|
-
const status = state.save();
|
|
42
|
-
snapshot.fileDeleted = status.deleted;
|
|
43
|
-
snapshot.added = state.added;
|
|
44
|
-
snapshot.matched = state.matched;
|
|
45
|
-
snapshot.unmatched = state.unmatched;
|
|
46
|
-
snapshot.updated = state.updated;
|
|
47
|
-
snapshot.unchecked = !status.deleted ? uncheckedCount : 0;
|
|
48
|
-
snapshot.uncheckedKeys = Array.from(uncheckedKeys);
|
|
49
|
-
return snapshot;
|
|
50
|
-
};
|
|
51
|
-
var addSnapshotResult = (summary, result) => {
|
|
52
|
-
if (result.added)
|
|
53
|
-
summary.filesAdded++;
|
|
54
|
-
if (result.fileDeleted)
|
|
55
|
-
summary.filesRemoved++;
|
|
56
|
-
if (result.unmatched)
|
|
57
|
-
summary.filesUnmatched++;
|
|
58
|
-
if (result.updated)
|
|
59
|
-
summary.filesUpdated++;
|
|
60
|
-
summary.added += result.added;
|
|
61
|
-
summary.matched += result.matched;
|
|
62
|
-
summary.unchecked += result.unchecked;
|
|
63
|
-
if (result.uncheckedKeys && result.uncheckedKeys.length > 0) {
|
|
64
|
-
summary.uncheckedKeysByFile.push({
|
|
65
|
-
filePath: result.filepath,
|
|
66
|
-
keys: result.uncheckedKeys
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
summary.unmatched += result.unmatched;
|
|
70
|
-
summary.updated += result.updated;
|
|
71
|
-
summary.total += result.added + result.matched + result.unmatched + result.updated;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
emptySummary,
|
|
76
|
-
packSnapshotState,
|
|
77
|
-
addSnapshotResult
|
|
78
|
-
};
|
package/dist/chunk-XUIDSY4V.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
init_esm_shims
|
|
3
|
-
} from "./chunk-R2SMNEBL.js";
|
|
4
|
-
|
|
5
|
-
// src/constants.ts
|
|
6
|
-
init_esm_shims();
|
|
7
|
-
import { resolve } from "path";
|
|
8
|
-
import { fileURLToPath } from "url";
|
|
9
|
-
var distDir = resolve(fileURLToPath(import.meta.url), "../../dist");
|
|
10
|
-
var defaultIncludes = ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"];
|
|
11
|
-
var defaultExcludes = ["**/node_modules/**", "**/dist/**"];
|
|
12
|
-
var globalApis = [
|
|
13
|
-
"suite",
|
|
14
|
-
"test",
|
|
15
|
-
"describe",
|
|
16
|
-
"it",
|
|
17
|
-
"chai",
|
|
18
|
-
"expect",
|
|
19
|
-
"assert",
|
|
20
|
-
"sinon",
|
|
21
|
-
"spy",
|
|
22
|
-
"mock",
|
|
23
|
-
"stub",
|
|
24
|
-
"beforeAll",
|
|
25
|
-
"afterAll",
|
|
26
|
-
"beforeEach",
|
|
27
|
-
"afterEach"
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
export {
|
|
31
|
-
distDir,
|
|
32
|
-
defaultIncludes,
|
|
33
|
-
defaultExcludes,
|
|
34
|
-
globalApis
|
|
35
|
-
};
|
package/dist/chunk-YPKHVZRP.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
afterAll,
|
|
3
|
-
afterEach,
|
|
4
|
-
beforeAll,
|
|
5
|
-
beforeEach,
|
|
6
|
-
clearContext,
|
|
7
|
-
createSuiteHooks,
|
|
8
|
-
defaultSuite,
|
|
9
|
-
describe,
|
|
10
|
-
it,
|
|
11
|
-
suite,
|
|
12
|
-
test
|
|
13
|
-
} from "./chunk-ANPMHBIF.js";
|
|
14
|
-
import {
|
|
15
|
-
__export,
|
|
16
|
-
init_esm_shims
|
|
17
|
-
} from "./chunk-R2SMNEBL.js";
|
|
18
|
-
|
|
19
|
-
// src/index.ts
|
|
20
|
-
var src_exports = {};
|
|
21
|
-
__export(src_exports, {
|
|
22
|
-
afterAll: () => afterAll,
|
|
23
|
-
afterEach: () => afterEach,
|
|
24
|
-
assert: () => assert,
|
|
25
|
-
beforeAll: () => beforeAll,
|
|
26
|
-
beforeEach: () => beforeEach,
|
|
27
|
-
chai: () => chai,
|
|
28
|
-
clearContext: () => clearContext,
|
|
29
|
-
createSuiteHooks: () => createSuiteHooks,
|
|
30
|
-
defaultSuite: () => defaultSuite,
|
|
31
|
-
describe: () => describe,
|
|
32
|
-
expect: () => expect,
|
|
33
|
-
it: () => it,
|
|
34
|
-
mock: () => mock,
|
|
35
|
-
should: () => should,
|
|
36
|
-
sinon: () => sinon,
|
|
37
|
-
spy: () => spy,
|
|
38
|
-
stub: () => stub,
|
|
39
|
-
suite: () => suite,
|
|
40
|
-
test: () => test
|
|
41
|
-
});
|
|
42
|
-
init_esm_shims();
|
|
43
|
-
|
|
44
|
-
// src/types/index.ts
|
|
45
|
-
init_esm_shims();
|
|
46
|
-
|
|
47
|
-
// src/types/options.ts
|
|
48
|
-
init_esm_shims();
|
|
49
|
-
|
|
50
|
-
// src/types/tasks.ts
|
|
51
|
-
init_esm_shims();
|
|
52
|
-
|
|
53
|
-
// src/types/reporter.ts
|
|
54
|
-
init_esm_shims();
|
|
55
|
-
|
|
56
|
-
// src/types/snapshot.ts
|
|
57
|
-
init_esm_shims();
|
|
58
|
-
|
|
59
|
-
// src/types/worker.ts
|
|
60
|
-
init_esm_shims();
|
|
61
|
-
|
|
62
|
-
// src/types/general.ts
|
|
63
|
-
init_esm_shims();
|
|
64
|
-
|
|
65
|
-
// src/integrations/chai/index.ts
|
|
66
|
-
init_esm_shims();
|
|
67
|
-
import chai from "chai";
|
|
68
|
-
import { assert, should, expect } from "chai";
|
|
69
|
-
|
|
70
|
-
// src/integrations/sinon.ts
|
|
71
|
-
init_esm_shims();
|
|
72
|
-
import sinon from "sinon";
|
|
73
|
-
var { mock, spy, stub } = sinon;
|
|
74
|
-
sinon.fn = sinon.spy;
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
chai,
|
|
78
|
-
assert,
|
|
79
|
-
should,
|
|
80
|
-
expect,
|
|
81
|
-
sinon,
|
|
82
|
-
mock,
|
|
83
|
-
spy,
|
|
84
|
-
stub,
|
|
85
|
-
src_exports
|
|
86
|
-
};
|
package/dist/global-PRFYLY7P.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
src_exports
|
|
3
|
-
} from "./chunk-YPKHVZRP.js";
|
|
4
|
-
import {
|
|
5
|
-
globalApis
|
|
6
|
-
} from "./chunk-XUIDSY4V.js";
|
|
7
|
-
import "./chunk-ANPMHBIF.js";
|
|
8
|
-
import "./chunk-APGELTDH.js";
|
|
9
|
-
import {
|
|
10
|
-
init_esm_shims
|
|
11
|
-
} from "./chunk-R2SMNEBL.js";
|
|
12
|
-
|
|
13
|
-
// src/integrations/global.ts
|
|
14
|
-
init_esm_shims();
|
|
15
|
-
function registerApiGlobally() {
|
|
16
|
-
globalApis.forEach((api) => {
|
|
17
|
-
globalThis[api] = src_exports[api];
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
registerApiGlobally
|
|
22
|
-
};
|
package/dist/node/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|