vitest 1.0.0-beta.4 → 1.0.0-beta.6
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 +1 -513
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +4 -4
- package/dist/child.js +13 -17
- package/dist/{chunk-api-setup.6d19ab38.js → chunks/api-setup.jHV5vgr2.js} +97 -39
- package/dist/chunks/install-pkg.ORGzQeqb.js +457 -0
- package/dist/chunks/integrations-globals.eip0xL77.js +29 -0
- package/dist/{chunk-node-git.6c12e560.js → chunks/node-git.Hw101KjS.js} +1 -18
- package/dist/{chunk-runtime-console.f3263f87.js → chunks/runtime-console.hf2msWA9.js} +1 -1
- package/dist/cli-wrapper.js +2 -18
- package/dist/cli.js +19 -24
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +4 -6
- package/dist/config.js +1 -1
- package/dist/coverage.d.ts +25 -15
- package/dist/coverage.js +118 -49
- package/dist/entry-vm.js +13 -13
- package/dist/entry.js +14 -14
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +3 -3
- package/dist/index.d.ts +168 -39
- package/dist/index.js +10 -10
- package/dist/node.d.ts +5 -5
- package/dist/node.js +17 -22
- package/dist/{vendor-paths.84fc7a99.js → paths.js} +1 -1
- package/dist/{reporters-50c2bd49.d.ts → reporters-vMlHjCdM.d.ts} +335 -365
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +7 -8
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +8 -8
- package/dist/{suite-ad69b7cd.d.ts → suite-vfxzpeqE.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +3 -3
- package/dist/{vendor-benchmark.b6befc50.js → vendor/benchmark.WVm6DARl.js} +1 -1
- package/dist/{vendor-date.6e993429.js → vendor/date.Ns1pGd_X.js} +1 -0
- package/dist/{vendor-environments.dcc4a34e.js → vendor/environments.ewIbzajW.js} +2 -1
- package/dist/{vendor-execute.157302d6.js → vendor/execute.aMjV5C9u.js} +2 -4
- package/dist/{vendor-index.72df742e.js → vendor/index.VL3WbvjT.js} +4 -4
- package/dist/{vendor-index.2b92937b.js → vendor/index.XU72Rmy8.js} +1 -1
- package/dist/{vendor-index.57925a34.js → vendor/index.h0j9y5vy.js} +5 -5
- package/dist/vendor/index.xL8XjTLv.js +3962 -0
- package/dist/vendor/loader.-JDdZ5RJ.js +39 -0
- package/dist/{vendor-node.65461b16.js → vendor/node.1xm0UoNi.js} +1904 -5957
- package/dist/{vendor-reporters.d24d80a4.js → vendor/reporters.pr8MinP9.js} +429 -377
- package/dist/{vendor-rpc.171f65fb.js → vendor/rpc.Bl-ysZIr.js} +1 -1
- package/dist/{vendor-run-once.fb836747.js → vendor/run-once.X3E7xx3F.js} +1 -1
- package/dist/{vendor-vi.3baa7c4a.js → vendor/vi.JXuS6emb.js} +4 -4
- package/dist/vm.js +13 -18
- package/dist/worker.js +13 -18
- package/import-meta.d.ts +5 -0
- package/index.cjs +5 -0
- package/package.json +52 -53
- package/dist/chunk-install-pkg.e1d6323e.js +0 -1740
- package/dist/chunk-integrations-globals.2b099e04.js +0 -29
- package/dist/vendor-index.8efe7746.js +0 -2236
- package/dist/vendor-loader.9c966f23.js +0 -2089
- /package/dist/{vendor-_commonjsHelpers.7d1333e8.js → vendor/_commonjsHelpers.jjO7Zipk.js} +0 -0
- /package/dist/{vendor-base.9c08bbd0.js → vendor/base._79unx2z.js} +0 -0
- /package/dist/{vendor-constants.538d9b49.js → vendor/constants.WSvnD_fn.js} +0 -0
- /package/dist/{vendor-coverage.78040316.js → vendor/coverage.v6aD8iAh.js} +0 -0
- /package/dist/{vendor-global.c3664e75.js → vendor/global.L7JRz1qU.js} +0 -0
- /package/dist/{vendor-index.1ca68bd5.js → vendor/index.cAUulNDf.js} +0 -0
- /package/dist/{vendor-inspector.209edf5a.js → vendor/inspector.lFAeuaAt.js} +0 -0
- /package/dist/{vendor-tasks.f9d75aed.js → vendor/tasks.IknbGB2n.js} +0 -0
package/dist/config.js
CHANGED
package/dist/coverage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-
|
|
1
|
+
import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-vMlHjCdM.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
|
@@ -14,12 +14,6 @@ import 'node:worker_threads';
|
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'chai';
|
|
16
16
|
|
|
17
|
-
// Type definitions for istanbul-lib-coverage 2.0
|
|
18
|
-
// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs
|
|
19
|
-
// Definitions by: Jason Cheatham <https://github.com/jason0x43>
|
|
20
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
21
|
-
// TypeScript Version: 2.4
|
|
22
|
-
|
|
23
17
|
interface CoverageSummaryData {
|
|
24
18
|
lines: Totals;
|
|
25
19
|
statements: Totals;
|
|
@@ -125,24 +119,40 @@ declare class FileCoverage implements FileCoverageData {
|
|
|
125
119
|
}
|
|
126
120
|
|
|
127
121
|
type Threshold = 'lines' | 'functions' | 'statements' | 'branches';
|
|
122
|
+
interface ResolvedThreshold {
|
|
123
|
+
coverageMap: CoverageMap;
|
|
124
|
+
name: string;
|
|
125
|
+
thresholds: Partial<Record<Threshold, number | undefined>>;
|
|
126
|
+
}
|
|
128
127
|
declare class BaseCoverageProvider {
|
|
129
128
|
/**
|
|
130
129
|
* Check if current coverage is above configured thresholds and bump the thresholds if needed
|
|
131
130
|
*/
|
|
132
|
-
updateThresholds({
|
|
133
|
-
|
|
134
|
-
thresholds: Record<Threshold, number | undefined>;
|
|
131
|
+
updateThresholds({ thresholds: allThresholds, perFile, configurationFile }: {
|
|
132
|
+
thresholds: ResolvedThreshold[];
|
|
135
133
|
perFile?: boolean;
|
|
136
|
-
configurationFile
|
|
134
|
+
configurationFile: {
|
|
135
|
+
read(): unknown;
|
|
136
|
+
write(): void;
|
|
137
|
+
};
|
|
137
138
|
}): void;
|
|
138
139
|
/**
|
|
139
|
-
*
|
|
140
|
+
* Check collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
|
|
140
141
|
*/
|
|
141
|
-
checkThresholds({
|
|
142
|
-
|
|
143
|
-
thresholds: Record<Threshold, number | undefined>;
|
|
142
|
+
checkThresholds({ thresholds: allThresholds, perFile }: {
|
|
143
|
+
thresholds: ResolvedThreshold[];
|
|
144
144
|
perFile?: boolean;
|
|
145
145
|
}): void;
|
|
146
|
+
/**
|
|
147
|
+
* Constructs collected coverage and users' threshold options into separate sets
|
|
148
|
+
* where each threshold set holds their own coverage maps. Threshold set is either
|
|
149
|
+
* for specific files defined by glob pattern or global for all other files.
|
|
150
|
+
*/
|
|
151
|
+
resolveThresholds({ coverageMap, thresholds, createCoverageMap }: {
|
|
152
|
+
coverageMap: CoverageMap;
|
|
153
|
+
thresholds: NonNullable<BaseCoverageOptions['thresholds']>;
|
|
154
|
+
createCoverageMap: () => CoverageMap;
|
|
155
|
+
}): ResolvedThreshold[];
|
|
146
156
|
/**
|
|
147
157
|
* Resolve reporters from various configuration options
|
|
148
158
|
*/
|
package/dist/coverage.js
CHANGED
|
@@ -1,70 +1,120 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync } from 'node:fs';
|
|
2
1
|
import { relative } from 'pathe';
|
|
2
|
+
import { m as mm } from './vendor/index.xL8XjTLv.js';
|
|
3
|
+
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
4
|
+
import 'util';
|
|
5
|
+
import 'path';
|
|
3
6
|
|
|
4
7
|
const THRESHOLD_KEYS = ["lines", "functions", "statements", "branches"];
|
|
8
|
+
const GLOBAL_THRESHOLDS_KEY = "global";
|
|
5
9
|
class BaseCoverageProvider {
|
|
6
10
|
/**
|
|
7
11
|
* Check if current coverage is above configured thresholds and bump the thresholds if needed
|
|
8
12
|
*/
|
|
9
|
-
updateThresholds({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
updateThresholds({ thresholds: allThresholds, perFile, configurationFile }) {
|
|
14
|
+
let updatedThresholds = false;
|
|
15
|
+
const config = configurationFile.read();
|
|
16
|
+
assertConfigurationModule(config);
|
|
17
|
+
for (const { coverageMap, thresholds, name } of allThresholds) {
|
|
18
|
+
const summaries = perFile ? coverageMap.files().map((file) => coverageMap.fileCoverageFor(file).toSummary()) : [coverageMap.getCoverageSummary()];
|
|
19
|
+
const thresholdsToUpdate = [];
|
|
20
|
+
for (const key of THRESHOLD_KEYS) {
|
|
21
|
+
const threshold = thresholds[key] ?? 100;
|
|
22
|
+
const actual = Math.min(...summaries.map((summary) => summary[key].pct));
|
|
23
|
+
if (actual > threshold)
|
|
24
|
+
thresholdsToUpdate.push([key, actual]);
|
|
25
|
+
}
|
|
26
|
+
if (thresholdsToUpdate.length === 0)
|
|
27
|
+
continue;
|
|
28
|
+
updatedThresholds = true;
|
|
29
|
+
for (const [threshold, newValue] of thresholdsToUpdate) {
|
|
30
|
+
if (name === GLOBAL_THRESHOLDS_KEY) {
|
|
31
|
+
config.test.coverage.thresholds[threshold] = newValue;
|
|
32
|
+
} else {
|
|
33
|
+
const glob = config.test.coverage.thresholds[name];
|
|
34
|
+
glob[threshold] = newValue;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
32
37
|
}
|
|
33
|
-
if (
|
|
38
|
+
if (updatedThresholds) {
|
|
34
39
|
console.log("Updating thresholds to configuration file. You may want to push with updated coverage thresholds.");
|
|
35
|
-
|
|
40
|
+
configurationFile.write();
|
|
36
41
|
}
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
39
|
-
*
|
|
44
|
+
* Check collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
|
|
40
45
|
*/
|
|
41
|
-
checkThresholds({
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
checkThresholds({ thresholds: allThresholds, perFile }) {
|
|
47
|
+
for (const { coverageMap, thresholds, name } of allThresholds) {
|
|
48
|
+
if (thresholds.branches === void 0 && thresholds.functions === void 0 && thresholds.lines === void 0 && thresholds.statements === void 0)
|
|
49
|
+
continue;
|
|
50
|
+
const summaries = perFile ? coverageMap.files().map((file) => ({
|
|
51
|
+
file,
|
|
52
|
+
summary: coverageMap.fileCoverageFor(file).toSummary()
|
|
53
|
+
})) : [{
|
|
54
|
+
file: null,
|
|
55
|
+
summary: coverageMap.getCoverageSummary()
|
|
56
|
+
}];
|
|
57
|
+
for (const { summary, file } of summaries) {
|
|
58
|
+
for (const thresholdKey of ["lines", "functions", "statements", "branches"]) {
|
|
59
|
+
const threshold = thresholds[thresholdKey];
|
|
60
|
+
if (threshold !== void 0) {
|
|
61
|
+
const coverage = summary.data[thresholdKey].pct;
|
|
62
|
+
if (coverage < threshold) {
|
|
63
|
+
process.exitCode = 1;
|
|
64
|
+
let errorMessage = `ERROR: Coverage for ${thresholdKey} (${coverage}%) does not meet ${name === GLOBAL_THRESHOLDS_KEY ? name : `"${name}"`} threshold (${threshold}%)`;
|
|
65
|
+
if (perFile && file)
|
|
66
|
+
errorMessage += ` for ${relative("./", file).replace(/\\/g, "/")}`;
|
|
67
|
+
console.error(errorMessage);
|
|
68
|
+
}
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Constructs collected coverage and users' threshold options into separate sets
|
|
76
|
+
* where each threshold set holds their own coverage maps. Threshold set is either
|
|
77
|
+
* for specific files defined by glob pattern or global for all other files.
|
|
78
|
+
*/
|
|
79
|
+
resolveThresholds({ coverageMap, thresholds, createCoverageMap }) {
|
|
80
|
+
const resolvedThresholds = [];
|
|
81
|
+
const files = coverageMap.files();
|
|
82
|
+
const filesMatchedByGlobs = [];
|
|
83
|
+
const globalCoverageMap = createCoverageMap();
|
|
84
|
+
for (const key of Object.keys(thresholds)) {
|
|
85
|
+
if (key === "perFile" || key === "autoUpdate" || key === "100" || THRESHOLD_KEYS.includes(key))
|
|
86
|
+
continue;
|
|
87
|
+
const glob = key;
|
|
88
|
+
const globThresholds = resolveGlobThresholds(thresholds[glob]);
|
|
89
|
+
const globCoverageMap = createCoverageMap();
|
|
90
|
+
const matchingFiles = files.filter((file) => mm.isMatch(file, glob));
|
|
91
|
+
filesMatchedByGlobs.push(...matchingFiles);
|
|
92
|
+
for (const file of matchingFiles) {
|
|
93
|
+
const fileCoverage = coverageMap.fileCoverageFor(file);
|
|
94
|
+
globCoverageMap.addFileCoverage(fileCoverage);
|
|
95
|
+
}
|
|
96
|
+
resolvedThresholds.push({
|
|
97
|
+
name: glob,
|
|
98
|
+
coverageMap: globCoverageMap,
|
|
99
|
+
thresholds: globThresholds
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
for (const file of files.filter((file2) => !filesMatchedByGlobs.includes(file2))) {
|
|
103
|
+
const fileCoverage = coverageMap.fileCoverageFor(file);
|
|
104
|
+
globalCoverageMap.addFileCoverage(fileCoverage);
|
|
105
|
+
}
|
|
106
|
+
resolvedThresholds.unshift({
|
|
107
|
+
name: GLOBAL_THRESHOLDS_KEY,
|
|
108
|
+
coverageMap: globalCoverageMap,
|
|
109
|
+
thresholds: {
|
|
110
|
+
branches: thresholds.branches,
|
|
111
|
+
functions: thresholds.functions,
|
|
112
|
+
lines: thresholds.lines,
|
|
113
|
+
statements: thresholds.statements
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return resolvedThresholds;
|
|
117
|
+
}
|
|
68
118
|
/**
|
|
69
119
|
* Resolve reporters from various configuration options
|
|
70
120
|
*/
|
|
@@ -82,5 +132,24 @@ class BaseCoverageProvider {
|
|
|
82
132
|
return resolvedReporters;
|
|
83
133
|
}
|
|
84
134
|
}
|
|
135
|
+
function resolveGlobThresholds(thresholds) {
|
|
136
|
+
if (!thresholds || typeof thresholds !== "object")
|
|
137
|
+
return {};
|
|
138
|
+
return {
|
|
139
|
+
lines: "lines" in thresholds && typeof thresholds.lines === "number" ? thresholds.lines : void 0,
|
|
140
|
+
branches: "branches" in thresholds && typeof thresholds.branches === "number" ? thresholds.branches : void 0,
|
|
141
|
+
functions: "functions" in thresholds && typeof thresholds.functions === "number" ? thresholds.functions : void 0,
|
|
142
|
+
statements: "statements" in thresholds && typeof thresholds.statements === "number" ? thresholds.statements : void 0
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function assertConfigurationModule(config) {
|
|
146
|
+
try {
|
|
147
|
+
if (typeof config.test.coverage.thresholds !== "object")
|
|
148
|
+
throw new Error("Expected config.test.coverage.thresholds to be an object");
|
|
149
|
+
} catch (error) {
|
|
150
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
151
|
+
throw new Error(`Unable to parse thresholds from configuration file: ${message}`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
85
154
|
|
|
86
155
|
export { BaseCoverageProvider };
|
package/dist/entry-vm.js
CHANGED
|
@@ -5,30 +5,30 @@ import timers from 'node:timers';
|
|
|
5
5
|
import { performance } from 'node:perf_hooks';
|
|
6
6
|
import { startTests } from '@vitest/runner';
|
|
7
7
|
import { setupColors, createColors } from '@vitest/utils';
|
|
8
|
-
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor
|
|
9
|
-
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor
|
|
10
|
-
import { g as getWorkerState } from './vendor
|
|
11
|
-
import { i as index } from './vendor
|
|
8
|
+
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor/index.h0j9y5vy.js';
|
|
9
|
+
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor/coverage.v6aD8iAh.js';
|
|
10
|
+
import { g as getWorkerState } from './vendor/global.L7JRz1qU.js';
|
|
11
|
+
import { i as index } from './vendor/index.VL3WbvjT.js';
|
|
12
12
|
import { setupCommonEnv } from './browser.js';
|
|
13
13
|
import 'chai';
|
|
14
14
|
import '@vitest/snapshot/environment';
|
|
15
15
|
import 'pathe';
|
|
16
|
-
import './
|
|
16
|
+
import './paths.js';
|
|
17
17
|
import 'node:url';
|
|
18
|
-
import './vendor
|
|
19
|
-
import './vendor
|
|
18
|
+
import './vendor/rpc.Bl-ysZIr.js';
|
|
19
|
+
import './vendor/benchmark.WVm6DARl.js';
|
|
20
20
|
import '@vitest/runner/utils';
|
|
21
|
-
import './vendor
|
|
21
|
+
import './vendor/index.XU72Rmy8.js';
|
|
22
22
|
import 'std-env';
|
|
23
|
-
import './vendor
|
|
24
|
-
import './vendor
|
|
25
|
-
import './vendor
|
|
23
|
+
import './vendor/run-once.X3E7xx3F.js';
|
|
24
|
+
import './vendor/vi.JXuS6emb.js';
|
|
25
|
+
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
26
26
|
import '@vitest/expect';
|
|
27
27
|
import '@vitest/snapshot';
|
|
28
28
|
import '@vitest/utils/error';
|
|
29
|
-
import './vendor
|
|
29
|
+
import './vendor/tasks.IknbGB2n.js';
|
|
30
30
|
import '@vitest/utils/source-map';
|
|
31
|
-
import './vendor
|
|
31
|
+
import './vendor/date.Ns1pGd_X.js';
|
|
32
32
|
import '@vitest/spy';
|
|
33
33
|
|
|
34
34
|
async function run(files, config, executor) {
|
package/dist/entry.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { startTests } from '@vitest/runner';
|
|
3
|
-
import './vendor
|
|
4
|
-
import { a as globalExpect, r as resetModules, v as vi } from './vendor
|
|
5
|
-
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor
|
|
6
|
-
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor
|
|
3
|
+
import './vendor/index.XU72Rmy8.js';
|
|
4
|
+
import { a as globalExpect, r as resetModules, v as vi } from './vendor/vi.JXuS6emb.js';
|
|
5
|
+
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor/coverage.v6aD8iAh.js';
|
|
6
|
+
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor/index.h0j9y5vy.js';
|
|
7
7
|
import { createRequire } from 'node:module';
|
|
8
8
|
import util from 'node:util';
|
|
9
9
|
import timers from 'node:timers';
|
|
10
10
|
import { isatty } from 'node:tty';
|
|
11
11
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
12
12
|
import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
|
|
13
|
-
import { i as index } from './vendor
|
|
13
|
+
import { i as index } from './vendor/index.VL3WbvjT.js';
|
|
14
14
|
import { setupCommonEnv } from './browser.js';
|
|
15
|
-
import { g as getWorkerState } from './vendor
|
|
15
|
+
import { g as getWorkerState } from './vendor/global.L7JRz1qU.js';
|
|
16
16
|
import 'pathe';
|
|
17
17
|
import 'std-env';
|
|
18
18
|
import '@vitest/runner/utils';
|
|
19
19
|
import 'chai';
|
|
20
|
-
import './vendor
|
|
20
|
+
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
21
21
|
import '@vitest/expect';
|
|
22
22
|
import '@vitest/snapshot';
|
|
23
23
|
import '@vitest/utils/error';
|
|
24
|
-
import './vendor
|
|
24
|
+
import './vendor/tasks.IknbGB2n.js';
|
|
25
25
|
import '@vitest/utils/source-map';
|
|
26
|
-
import './vendor
|
|
26
|
+
import './vendor/date.Ns1pGd_X.js';
|
|
27
27
|
import '@vitest/spy';
|
|
28
28
|
import '@vitest/snapshot/environment';
|
|
29
|
-
import './
|
|
29
|
+
import './paths.js';
|
|
30
30
|
import 'node:url';
|
|
31
|
-
import './vendor
|
|
32
|
-
import './vendor
|
|
33
|
-
import './vendor
|
|
31
|
+
import './vendor/rpc.Bl-ysZIr.js';
|
|
32
|
+
import './vendor/benchmark.WVm6DARl.js';
|
|
33
|
+
import './vendor/run-once.X3E7xx3F.js';
|
|
34
34
|
|
|
35
35
|
let globalSetup = false;
|
|
36
36
|
async function setupGlobalEnv(config, { environment }) {
|
|
@@ -66,7 +66,7 @@ async function setupGlobalEnv(config, { environment }) {
|
|
|
66
66
|
await setupConsoleLogSpy(state);
|
|
67
67
|
}
|
|
68
68
|
async function setupConsoleLogSpy(state) {
|
|
69
|
-
const { createCustomConsole } = await import('./
|
|
69
|
+
const { createCustomConsole } = await import('./chunks/runtime-console.hf2msWA9.js');
|
|
70
70
|
globalThis.console = createCustomConsole(state);
|
|
71
71
|
}
|
|
72
72
|
async function withEnv({ environment }, options, fn) {
|
package/dist/environments.d.ts
CHANGED
package/dist/environments.js
CHANGED
package/dist/execute.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vm from 'node:vm';
|
|
2
2
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
3
3
|
import { ViteNodeRunnerOptions } from 'vite-node';
|
|
4
|
-
import {
|
|
4
|
+
import { am as PendingSuiteMock, an as MockFactory, ao as MockMap, a2 as WorkerGlobalState, g as RuntimeRPC } from './reporters-vMlHjCdM.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import '@vitest/snapshot';
|
package/dist/execute.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { V as VitestExecutor } from './vendor
|
|
1
|
+
export { V as VitestExecutor } from './vendor/execute.aMjV5C9u.js';
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import 'vite-node/client';
|
|
5
5
|
import 'vite-node/utils';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import '@vitest/utils/error';
|
|
8
|
-
import './
|
|
8
|
+
import './paths.js';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import '@vitest/utils';
|
|
11
|
-
import './vendor
|
|
11
|
+
import './vendor/base._79unx2z.js';
|
|
12
12
|
import 'node:path';
|
|
13
13
|
import 'node:module';
|
|
14
14
|
import 'vite-node/constants';
|