vitest 1.0.0-beta.3 → 1.0.0-beta.5
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 +3 -498
- package/dist/browser.d.ts +1 -2
- package/dist/browser.js +4 -4
- package/dist/child.js +15 -18
- package/dist/{chunk-api-setup.37a43981.js → chunks/api-setup.jHV5vgr2.js} +101 -39
- package/dist/chunks/install-pkg.ORGzQeqb.js +457 -0
- package/dist/chunks/integrations-globals.-pds_Gug.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.iCAG0Yz3.js} +1 -1
- package/dist/cli-wrapper.js +2 -18
- package/dist/cli.js +21 -23
- package/dist/config.cjs +2 -1
- package/dist/config.d.ts +4 -7
- package/dist/config.js +2 -1
- package/dist/coverage.d.ts +25 -16
- 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 -2
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +2 -3
- package/dist/execute.js +3 -4
- package/dist/index.d.ts +396 -95
- package/dist/index.js +10 -10
- package/dist/node.d.ts +10 -6
- package/dist/node.js +17 -22
- package/dist/{vendor-paths.84fc7a99.js → paths.js} +1 -1
- package/dist/{reporters-1678fe04.d.ts → reporters-ANEBTnOh.d.ts} +336 -340
- package/dist/reporters.d.ts +1 -2
- package/dist/reporters.js +7 -8
- package/dist/runners.d.ts +1 -2
- package/dist/runners.js +8 -9
- package/dist/{suite-0579b50d.d.ts → suite-C1OmA61l.d.ts} +1 -1
- package/dist/suite.d.ts +2 -3
- package/dist/suite.js +3 -3
- package/dist/{vendor-benchmark.44931cfa.js → vendor/benchmark.WVm6DARl.js} +1 -1
- package/dist/{vendor-execute.e6e4e89b.js → vendor/execute.aMjV5C9u.js} +4 -7
- package/dist/vendor/global.L7JRz1qU.js +14 -0
- package/dist/{vendor-index.68ecee35.js → vendor/index.Npc-eff0.js} +11 -4
- package/dist/{vendor-index.29282562.js → vendor/index.XU72Rmy8.js} +1 -1
- package/dist/{vendor-index.3d079eea.js → vendor/index.h0j9y5vy.js} +5 -5
- package/dist/vendor/index.xL8XjTLv.js +3962 -0
- package/dist/vendor/loader.CU0NY2Is.js +39 -0
- package/dist/{vendor-node.327f8f1f.js → vendor/node.c-kzGvOB.js} +2192 -5614
- package/dist/{vendor-reporters.b9600369.js → vendor/reporters.1xKxm8im.js} +424 -374
- package/dist/{vendor-rpc.cbd8e972.js → vendor/rpc.Bl-ysZIr.js} +1 -1
- package/dist/{vendor-run-once.3e5ef7d7.js → vendor/run-once.X3E7xx3F.js} +1 -1
- package/dist/{vendor-vi.d30b47ae.js → vendor/vi.voNYQWB_.js} +35 -38
- package/dist/vm.js +16 -20
- package/dist/worker.js +16 -20
- package/index.cjs +5 -0
- package/package.json +50 -54
- package/dist/chunk-install-pkg.6349b322.js +0 -1740
- package/dist/chunk-integrations-globals.9df12d91.js +0 -29
- package/dist/vendor-global.97e4527c.js +0 -9
- 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-date.6e993429.js → vendor/date.W90-E5kF.js} +0 -0
- /package/dist/{vendor-environments.dcc4a34e.js → vendor/environments.hpEVJZPC.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.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-
|
|
3
|
+
import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-ANEBTnOh.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import 'vite-node';
|
|
6
6
|
import '@vitest/snapshot';
|
|
@@ -12,7 +12,6 @@ import 'vite-node/client';
|
|
|
12
12
|
import '@vitest/snapshot/manager';
|
|
13
13
|
import 'vite-node/server';
|
|
14
14
|
import 'node:worker_threads';
|
|
15
|
-
import 'rollup';
|
|
16
15
|
import 'node:fs';
|
|
17
16
|
import 'chai';
|
|
18
17
|
|
|
@@ -77,11 +76,9 @@ declare function defineConfig(config: UserConfig$1): UserConfig$1;
|
|
|
77
76
|
declare function defineConfig(config: Promise<UserConfig$1>): Promise<UserConfig$1>;
|
|
78
77
|
declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
|
|
79
78
|
declare function defineConfig(config: UserConfigExport): UserConfigExport;
|
|
80
|
-
declare function defineProject(config:
|
|
81
|
-
declare function defineWorkspace
|
|
79
|
+
declare function defineProject<T extends UserProjectConfigExport>(config: T): T;
|
|
80
|
+
declare function defineWorkspace<T extends (string | (UserProjectConfigExport & {
|
|
82
81
|
extends?: string;
|
|
83
|
-
}))[]):
|
|
84
|
-
extends?: string | undefined;
|
|
85
|
-
}))[];
|
|
82
|
+
}))[]>(config: T): T;
|
|
86
83
|
|
|
87
84
|
export { type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserProjectConfigExport, type UserProjectConfigFn, type UserWorkspaceConfig, configDefaults, coverageConfigDefaults, defaultExclude, defaultInclude, defineConfig, defineProject, defineWorkspace };
|
package/dist/config.js
CHANGED
|
@@ -9,6 +9,7 @@ const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**
|
|
|
9
9
|
const defaultCoverageExcludes = [
|
|
10
10
|
"coverage/**",
|
|
11
11
|
"dist/**",
|
|
12
|
+
"**/[.]**",
|
|
12
13
|
"packages/*/test?(s)/**",
|
|
13
14
|
"**/*.d.ts",
|
|
14
15
|
"**/virtual:*",
|
|
@@ -75,7 +76,7 @@ const config = {
|
|
|
75
76
|
api: false,
|
|
76
77
|
ui: false,
|
|
77
78
|
uiBase: "/__vitest__/",
|
|
78
|
-
open:
|
|
79
|
+
open: !isCI,
|
|
79
80
|
css: {
|
|
80
81
|
include: []
|
|
81
82
|
},
|
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-ANEBTnOh.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
|
@@ -11,16 +11,9 @@ import 'vite-node/client';
|
|
|
11
11
|
import '@vitest/snapshot/manager';
|
|
12
12
|
import 'vite-node/server';
|
|
13
13
|
import 'node:worker_threads';
|
|
14
|
-
import 'rollup';
|
|
15
14
|
import 'node:fs';
|
|
16
15
|
import 'chai';
|
|
17
16
|
|
|
18
|
-
// Type definitions for istanbul-lib-coverage 2.0
|
|
19
|
-
// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs
|
|
20
|
-
// Definitions by: Jason Cheatham <https://github.com/jason0x43>
|
|
21
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
22
|
-
// TypeScript Version: 2.4
|
|
23
|
-
|
|
24
17
|
interface CoverageSummaryData {
|
|
25
18
|
lines: Totals;
|
|
26
19
|
statements: Totals;
|
|
@@ -126,24 +119,40 @@ declare class FileCoverage implements FileCoverageData {
|
|
|
126
119
|
}
|
|
127
120
|
|
|
128
121
|
type Threshold = 'lines' | 'functions' | 'statements' | 'branches';
|
|
122
|
+
interface ResolvedThreshold {
|
|
123
|
+
coverageMap: CoverageMap;
|
|
124
|
+
name: string;
|
|
125
|
+
thresholds: Partial<Record<Threshold, number | undefined>>;
|
|
126
|
+
}
|
|
129
127
|
declare class BaseCoverageProvider {
|
|
130
128
|
/**
|
|
131
129
|
* Check if current coverage is above configured thresholds and bump the thresholds if needed
|
|
132
130
|
*/
|
|
133
|
-
updateThresholds({
|
|
134
|
-
|
|
135
|
-
thresholds: Record<Threshold, number | undefined>;
|
|
131
|
+
updateThresholds({ thresholds: allThresholds, perFile, configurationFile }: {
|
|
132
|
+
thresholds: ResolvedThreshold[];
|
|
136
133
|
perFile?: boolean;
|
|
137
|
-
configurationFile
|
|
134
|
+
configurationFile: {
|
|
135
|
+
read(): unknown;
|
|
136
|
+
write(): void;
|
|
137
|
+
};
|
|
138
138
|
}): void;
|
|
139
139
|
/**
|
|
140
|
-
*
|
|
140
|
+
* Check collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
|
|
141
141
|
*/
|
|
142
|
-
checkThresholds({
|
|
143
|
-
|
|
144
|
-
thresholds: Record<Threshold, number | undefined>;
|
|
142
|
+
checkThresholds({ thresholds: allThresholds, perFile }: {
|
|
143
|
+
thresholds: ResolvedThreshold[];
|
|
145
144
|
perFile?: boolean;
|
|
146
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[];
|
|
147
156
|
/**
|
|
148
157
|
* Resolve reporters from various configuration options
|
|
149
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.Npc-eff0.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.voNYQWB_.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.W90-E5kF.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.voNYQWB_.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.Npc-eff0.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.W90-E5kF.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.iCAG0Yz3.js');
|
|
70
70
|
globalThis.console = createCustomConsole(state);
|
|
71
71
|
}
|
|
72
72
|
async function withEnv({ environment }, options, fn) {
|
package/dist/environments.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Environment } from './reporters-
|
|
1
|
+
import { E as Environment } from './reporters-ANEBTnOh.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
|
@@ -11,7 +11,6 @@ import 'vite-node/client';
|
|
|
11
11
|
import '@vitest/snapshot/manager';
|
|
12
12
|
import 'vite-node/server';
|
|
13
13
|
import 'node:worker_threads';
|
|
14
|
-
import 'rollup';
|
|
15
14
|
import 'node:fs';
|
|
16
15
|
import 'chai';
|
|
17
16
|
|
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-ANEBTnOh.js';
|
|
5
5
|
import 'vite';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import '@vitest/snapshot';
|
|
@@ -12,7 +12,6 @@ import 'tinybench';
|
|
|
12
12
|
import '@vitest/snapshot/manager';
|
|
13
13
|
import 'vite-node/server';
|
|
14
14
|
import 'node:worker_threads';
|
|
15
|
-
import 'rollup';
|
|
16
15
|
import 'node:fs';
|
|
17
16
|
import 'chai';
|
|
18
17
|
|
|
@@ -126,7 +125,7 @@ declare class VitestExecutor extends ViteNodeRunner {
|
|
|
126
125
|
Reflect: typeof Reflect;
|
|
127
126
|
Symbol: SymbolConstructor;
|
|
128
127
|
};
|
|
129
|
-
get state():
|
|
128
|
+
get state(): any;
|
|
130
129
|
shouldResolveId(id: string, _importee?: string | undefined): boolean;
|
|
131
130
|
originalResolveUrl(id: string, importer?: string): Promise<[url: string, fsPath: string]>;
|
|
132
131
|
resolveUrl(id: string, importer?: string): Promise<[string, string]>;
|
package/dist/execute.js
CHANGED
|
@@ -1,15 +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 './
|
|
9
|
-
import './vendor-global.97e4527c.js';
|
|
8
|
+
import './paths.js';
|
|
10
9
|
import 'node:fs';
|
|
11
10
|
import '@vitest/utils';
|
|
12
|
-
import './vendor
|
|
11
|
+
import './vendor/base._79unx2z.js';
|
|
13
12
|
import 'node:path';
|
|
14
13
|
import 'node:module';
|
|
15
14
|
import 'vite-node/constants';
|