vitest 3.1.0-beta.1 → 3.1.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 +29 -0
- package/dist/browser.js +4 -4
- package/dist/chunks/base.bV8rwssx.js +41 -0
- package/dist/chunks/benchmark.BKUatJGy.js +39 -0
- package/dist/chunks/cac.1WcTh-zl.js +1529 -0
- package/dist/chunks/{cli-api.BwkkJsRe.js → cli-api.2yb7XCwB.js} +4640 -5072
- package/dist/chunks/console.D6t261w0.js +173 -0
- package/dist/chunks/constants.BZZyIeIE.js +43 -0
- package/dist/chunks/coverage.0iPg4Wrz.js +33 -0
- package/dist/chunks/{coverage.gV8doR2Y.js → coverage.SfnlalVs.js} +2424 -2482
- package/dist/chunks/creator.CuL7xDWI.js +705 -0
- package/dist/chunks/date.CDOsz-HY.js +53 -0
- package/dist/chunks/defaults.DmfNPoe5.js +114 -0
- package/dist/chunks/{env.D4Lgay0q.js → env.Dq0hM4Xv.js} +1 -1
- package/dist/chunks/execute.CwmnH2oH.js +791 -0
- package/dist/chunks/git.DXfdBEfR.js +74 -0
- package/dist/chunks/{globals.BEpDe-k3.js → globals.DCbUWjip.js} +10 -10
- package/dist/chunks/{index.D7Ny8f_s.js → index.BDobFbcz.js} +6 -7
- package/dist/chunks/index.CwHmn5H5.js +2422 -0
- package/dist/chunks/index.DFXFpH3w.js +607 -0
- package/dist/chunks/index.VfYQ6MXY.js +104 -0
- package/dist/chunks/inspector.DbDkSkFn.js +54 -0
- package/dist/chunks/node.IqGoMrm4.js +15 -0
- package/dist/chunks/{reporters.d.r7poTZjA.d.ts → reporters.d.CfRkRKN2.d.ts} +52 -20
- package/dist/chunks/rpc.DGgL5dw7.js +92 -0
- package/dist/chunks/run-once.I7PpBOk1.js +47 -0
- package/dist/chunks/runBaseTests.CqmKSG99.js +134 -0
- package/dist/chunks/setup-common.DEGDGBiA.js +88 -0
- package/dist/chunks/{typechecker.BlF3eHsb.js → typechecker.CG0zmr19.js} +620 -622
- package/dist/chunks/utils.BfxieIyZ.js +66 -0
- package/dist/chunks/utils.CtocqOoE.js +72 -0
- package/dist/chunks/utils.Lot3J_8U.js +194 -0
- package/dist/chunks/{vi.nSCvwQ7l.js → vi.B-PuvDzu.js} +878 -1019
- package/dist/chunks/vite.d.4pkSbgmp.d.ts +23 -0
- package/dist/chunks/vm.Lp7mPCVW.js +796 -0
- package/dist/cli.js +2 -2
- package/dist/config.cjs +97 -103
- package/dist/config.d.ts +6 -4
- package/dist/config.js +6 -6
- package/dist/coverage.d.ts +2 -1
- package/dist/coverage.js +7 -7
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +0 -2
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +6 -6
- package/dist/node.d.ts +17 -6
- package/dist/node.js +36 -45
- package/dist/path.js +1 -4
- package/dist/reporters.d.ts +2 -1
- package/dist/reporters.js +4 -4
- package/dist/runners.js +231 -267
- package/dist/snapshot.js +2 -2
- package/dist/suite.js +2 -2
- package/dist/worker.js +98 -114
- package/dist/workers/forks.js +22 -22
- package/dist/workers/runVmTests.js +61 -66
- package/dist/workers/threads.js +13 -13
- package/dist/workers/vmForks.js +24 -24
- package/dist/workers/vmThreads.js +15 -15
- package/dist/workers.d.ts +2 -1
- package/dist/workers.js +10 -10
- package/package.json +17 -17
- package/dist/chunks/base.DV59CbtV.js +0 -45
- package/dist/chunks/benchmark.DL72EVN-.js +0 -40
- package/dist/chunks/cac.BjmXy7OV.js +0 -1664
- package/dist/chunks/console.CN7AiMGV.js +0 -179
- package/dist/chunks/constants.DTYd6dNH.js +0 -46
- package/dist/chunks/coverage.A3sS5-Wm.js +0 -40
- package/dist/chunks/creator.BsBnpTzI.js +0 -670
- package/dist/chunks/date.W2xKR2qe.js +0 -53
- package/dist/chunks/defaults.C2Ndd9wx.js +0 -119
- package/dist/chunks/execute.eDH0aFFd.js +0 -839
- package/dist/chunks/git.B5SDxu-n.js +0 -69
- package/dist/chunks/index.DOyx6FYJ.js +0 -2551
- package/dist/chunks/index.K90BXFOx.js +0 -658
- package/dist/chunks/index.uXkkC4xl.js +0 -111
- package/dist/chunks/inspector.DKLceBVD.js +0 -54
- package/dist/chunks/node.AKq966Jp.js +0 -15
- package/dist/chunks/rpc.TVf73xOu.js +0 -102
- package/dist/chunks/run-once.2ogXb3JV.js +0 -28
- package/dist/chunks/runBaseTests.BVrL_ow3.js +0 -142
- package/dist/chunks/setup-common.CPvtqi8q.js +0 -96
- package/dist/chunks/utils.C8RiOc4B.js +0 -77
- package/dist/chunks/utils.Cn0zI1t3.js +0 -68
- package/dist/chunks/utils.bLM2atbD.js +0 -198
- package/dist/chunks/vite.d.Fvq-NZoa.d.ts +0 -11
- package/dist/chunks/vm.jEFQDlX_.js +0 -852
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as createCLI } from './chunks/cac.
|
|
1
|
+
import { c as createCLI } from './chunks/cac.1WcTh-zl.js';
|
|
2
2
|
import '@vitest/utils';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'pathe';
|
|
5
5
|
import 'tinyrainbow';
|
|
6
|
-
import './chunks/constants.
|
|
6
|
+
import './chunks/constants.BZZyIeIE.js';
|
|
7
7
|
|
|
8
8
|
createCLI().parse();
|
package/dist/config.cjs
CHANGED
|
@@ -6,132 +6,126 @@ var vite = require('vite');
|
|
|
6
6
|
|
|
7
7
|
const defaultBrowserPort = 63315;
|
|
8
8
|
const extraInlineDeps = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/vite\w*\/dist\/client\/env.mjs/
|
|
9
|
+
/^(?!.*node_modules).*\.mjs$/,
|
|
10
|
+
/^(?!.*node_modules).*\.cjs\.js$/,
|
|
11
|
+
/vite\w*\/dist\/client\/env.mjs/
|
|
13
12
|
];
|
|
14
13
|
|
|
15
14
|
const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
|
|
16
|
-
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !==
|
|
15
|
+
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== undefined;
|
|
17
16
|
(isNode || isDeno) && process.platform === "win32";
|
|
18
17
|
(isNode || isDeno) && process.stdout?.isTTY && !stdEnv.isCI;
|
|
19
18
|
|
|
20
19
|
const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
|
|
21
20
|
const defaultExclude = [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
"**/node_modules/**",
|
|
22
|
+
"**/dist/**",
|
|
23
|
+
"**/cypress/**",
|
|
24
|
+
"**/.{idea,git,cache,output,temp}/**",
|
|
25
|
+
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*"
|
|
27
26
|
];
|
|
28
27
|
const defaultCoverageExcludes = [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
"coverage/**",
|
|
29
|
+
"dist/**",
|
|
30
|
+
"**/node_modules/**",
|
|
31
|
+
"**/[.]**",
|
|
32
|
+
"packages/*/test?(s)/**",
|
|
33
|
+
"**/*.d.ts",
|
|
34
|
+
"**/virtual:*",
|
|
35
|
+
"**/__x00__*",
|
|
36
|
+
"**/\0*",
|
|
37
|
+
"cypress/**",
|
|
38
|
+
"test?(s)/**",
|
|
39
|
+
"test?(-*).?(c|m)[jt]s?(x)",
|
|
40
|
+
"**/*{.,-}{test,spec,bench,benchmark}?(-d).?(c|m)[jt]s?(x)",
|
|
41
|
+
"**/__tests__/**",
|
|
42
|
+
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*",
|
|
43
|
+
"**/vitest.{workspace,projects}.[jt]s?(on)",
|
|
44
|
+
"**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}"
|
|
46
45
|
];
|
|
47
46
|
const coverageConfigDefaults = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
20,
|
|
80
|
-
os.availableParallelism?.() ?? os.cpus().length
|
|
81
|
-
)
|
|
47
|
+
provider: "v8",
|
|
48
|
+
enabled: false,
|
|
49
|
+
all: true,
|
|
50
|
+
clean: true,
|
|
51
|
+
cleanOnRerun: true,
|
|
52
|
+
reportsDirectory: "./coverage",
|
|
53
|
+
exclude: defaultCoverageExcludes,
|
|
54
|
+
reportOnFailure: false,
|
|
55
|
+
reporter: [
|
|
56
|
+
["text", {}],
|
|
57
|
+
["html", {}],
|
|
58
|
+
["clover", {}],
|
|
59
|
+
["json", {}]
|
|
60
|
+
],
|
|
61
|
+
extension: [
|
|
62
|
+
".js",
|
|
63
|
+
".cjs",
|
|
64
|
+
".mjs",
|
|
65
|
+
".ts",
|
|
66
|
+
".mts",
|
|
67
|
+
".tsx",
|
|
68
|
+
".jsx",
|
|
69
|
+
".vue",
|
|
70
|
+
".svelte",
|
|
71
|
+
".marko",
|
|
72
|
+
".astro"
|
|
73
|
+
],
|
|
74
|
+
allowExternal: false,
|
|
75
|
+
excludeAfterRemap: false,
|
|
76
|
+
ignoreEmptyLines: true,
|
|
77
|
+
processingConcurrency: Math.min(20, os.availableParallelism?.() ?? os.cpus().length)
|
|
82
78
|
};
|
|
83
79
|
const fakeTimersDefaults = {
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
loopLimit: 1e4,
|
|
81
|
+
shouldClearNativeTimers: true
|
|
86
82
|
};
|
|
87
83
|
const configDefaults = Object.freeze({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
slowTestThreshold: 300,
|
|
124
|
-
disableConsoleIntercept: false
|
|
84
|
+
allowOnly: !stdEnv.isCI,
|
|
85
|
+
isolate: true,
|
|
86
|
+
watch: !stdEnv.isCI,
|
|
87
|
+
globals: false,
|
|
88
|
+
environment: "node",
|
|
89
|
+
pool: "forks",
|
|
90
|
+
clearMocks: false,
|
|
91
|
+
restoreMocks: false,
|
|
92
|
+
mockReset: false,
|
|
93
|
+
unstubGlobals: false,
|
|
94
|
+
unstubEnvs: false,
|
|
95
|
+
include: defaultInclude,
|
|
96
|
+
exclude: defaultExclude,
|
|
97
|
+
teardownTimeout: 1e4,
|
|
98
|
+
forceRerunTriggers: ["**/package.json/**", "**/{vitest,vite}.config.*/**"],
|
|
99
|
+
update: false,
|
|
100
|
+
reporters: [],
|
|
101
|
+
silent: false,
|
|
102
|
+
hideSkippedTests: false,
|
|
103
|
+
api: false,
|
|
104
|
+
ui: false,
|
|
105
|
+
uiBase: "/__vitest__/",
|
|
106
|
+
open: !stdEnv.isCI,
|
|
107
|
+
css: { include: [] },
|
|
108
|
+
coverage: coverageConfigDefaults,
|
|
109
|
+
fakeTimers: fakeTimersDefaults,
|
|
110
|
+
maxConcurrency: 5,
|
|
111
|
+
dangerouslyIgnoreUnhandledErrors: false,
|
|
112
|
+
typecheck: {
|
|
113
|
+
checker: "tsc",
|
|
114
|
+
include: ["**/*.{test,spec}-d.?(c|m)[jt]s?(x)"],
|
|
115
|
+
exclude: defaultExclude
|
|
116
|
+
},
|
|
117
|
+
slowTestThreshold: 300,
|
|
118
|
+
disableConsoleIntercept: false
|
|
125
119
|
});
|
|
126
120
|
|
|
127
121
|
function defineConfig(config) {
|
|
128
|
-
|
|
122
|
+
return config;
|
|
129
123
|
}
|
|
130
124
|
function defineProject(config) {
|
|
131
|
-
|
|
125
|
+
return config;
|
|
132
126
|
}
|
|
133
127
|
function defineWorkspace(config) {
|
|
134
|
-
|
|
128
|
+
return config;
|
|
135
129
|
}
|
|
136
130
|
|
|
137
131
|
Object.defineProperty(exports, "mergeConfig", {
|
package/dist/config.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import {
|
|
4
|
-
export { W as WorkspaceProjectConfiguration } from './chunks/reporters.d.
|
|
5
|
-
import './chunks/vite.d.
|
|
3
|
+
import { c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport, b as TestProjectConfiguration } from './chunks/reporters.d.CfRkRKN2.js';
|
|
4
|
+
export { f as TestProjectInlineConfiguration, W as WorkspaceProjectConfiguration } from './chunks/reporters.d.CfRkRKN2.js';
|
|
5
|
+
import './chunks/vite.d.4pkSbgmp.js';
|
|
6
6
|
import { F as FakeTimerInstallOpts } from './chunks/config.d.DevWltVl.js';
|
|
7
7
|
import '@vitest/runner';
|
|
8
8
|
import './chunks/environment.d.C8UItCbf.js';
|
|
9
9
|
import '@vitest/utils';
|
|
10
10
|
import 'node:stream';
|
|
11
11
|
import 'node:console';
|
|
12
|
+
import '@vitest/mocker';
|
|
12
13
|
import '@vitest/utils/source-map';
|
|
13
14
|
import '@vitest/pretty-format';
|
|
14
15
|
import '@vitest/snapshot';
|
|
@@ -89,4 +90,5 @@ declare function defineProject(config: UserProjectConfigFn): UserProjectConfigFn
|
|
|
89
90
|
declare function defineProject(config: UserProjectConfigExport): UserProjectConfigExport;
|
|
90
91
|
declare function defineWorkspace(config: TestProjectConfiguration[]): TestProjectConfiguration[];
|
|
91
92
|
|
|
92
|
-
export { TestProjectConfiguration,
|
|
93
|
+
export { TestProjectConfiguration, UserProjectConfigExport, UserProjectConfigFn, UserWorkspaceConfig, configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, defineWorkspace, extraInlineDeps };
|
|
94
|
+
export type { UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise };
|
package/dist/config.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { d as defaultBrowserPort, e as extraInlineDeps } from './chunks/constants.
|
|
2
|
-
export { c as configDefaults, a as coverageConfigDefaults, d as defaultExclude, b as defaultInclude } from './chunks/defaults.
|
|
1
|
+
export { d as defaultBrowserPort, e as extraInlineDeps } from './chunks/constants.BZZyIeIE.js';
|
|
2
|
+
export { c as configDefaults, a as coverageConfigDefaults, d as defaultExclude, b as defaultInclude } from './chunks/defaults.DmfNPoe5.js';
|
|
3
3
|
export { mergeConfig } from 'vite';
|
|
4
4
|
import 'node:os';
|
|
5
|
-
import './chunks/env.
|
|
5
|
+
import './chunks/env.Dq0hM4Xv.js';
|
|
6
6
|
import 'std-env';
|
|
7
7
|
|
|
8
8
|
function defineConfig(config) {
|
|
9
|
-
|
|
9
|
+
return config;
|
|
10
10
|
}
|
|
11
11
|
function defineProject(config) {
|
|
12
|
-
|
|
12
|
+
return config;
|
|
13
13
|
}
|
|
14
14
|
function defineWorkspace(config) {
|
|
15
|
-
|
|
15
|
+
return config;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export { defineConfig, defineProject, defineWorkspace };
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.
|
|
1
|
+
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.CfRkRKN2.js';
|
|
2
2
|
import { TransformResult } from 'vite';
|
|
3
3
|
import { A as AfterSuiteRunMeta } from './chunks/environment.d.C8UItCbf.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import '@vitest/utils';
|
|
6
6
|
import 'node:stream';
|
|
7
7
|
import 'node:console';
|
|
8
|
+
import '@vitest/mocker';
|
|
8
9
|
import '@vitest/utils/source-map';
|
|
9
10
|
import './chunks/config.d.DevWltVl.js';
|
|
10
11
|
import '@vitest/pretty-format';
|
package/dist/coverage.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export { B as BaseCoverageProvider } from './chunks/coverage.
|
|
1
|
+
export { B as BaseCoverageProvider } from './chunks/coverage.SfnlalVs.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
4
4
|
import 'util';
|
|
5
5
|
import 'path';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import 'tinyrainbow';
|
|
8
|
-
import './chunks/defaults.
|
|
8
|
+
import './chunks/defaults.DmfNPoe5.js';
|
|
9
9
|
import 'node:os';
|
|
10
|
-
import './chunks/env.
|
|
10
|
+
import './chunks/env.Dq0hM4Xv.js';
|
|
11
11
|
import 'std-env';
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import '@vitest/utils';
|
|
14
|
-
import 'node:fs/promises';
|
|
15
14
|
import 'node:module';
|
|
16
15
|
import 'node:path';
|
|
17
16
|
import 'node:process';
|
|
17
|
+
import 'node:fs/promises';
|
|
18
18
|
import 'node:url';
|
|
19
19
|
import 'node:assert';
|
|
20
20
|
import 'node:v8';
|
|
21
21
|
import 'node:util';
|
|
22
|
-
import './chunks/constants.
|
|
22
|
+
import './chunks/constants.BZZyIeIE.js';
|
|
23
23
|
import 'node:tty';
|
|
24
24
|
import 'vite';
|
|
25
25
|
import 'node:events';
|
|
26
26
|
import './chunks/index.68735LiX.js';
|
|
27
27
|
import 'tinypool';
|
|
28
|
-
import './chunks/typechecker.
|
|
28
|
+
import './chunks/typechecker.CG0zmr19.js';
|
|
29
29
|
import 'node:perf_hooks';
|
|
30
30
|
import '@vitest/utils/source-map';
|
|
31
31
|
import 'tinyexec';
|
|
@@ -34,4 +34,4 @@ import 'fs';
|
|
|
34
34
|
import 'node:worker_threads';
|
|
35
35
|
import './path.js';
|
|
36
36
|
import 'vite-node/utils';
|
|
37
|
-
import './chunks/coverage.
|
|
37
|
+
import './chunks/coverage.0iPg4Wrz.js';
|
package/dist/environments.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.
|
|
1
|
+
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.DFXFpH3w.js';
|
|
2
2
|
import 'node:console';
|
package/dist/execute.d.ts
CHANGED
|
@@ -64,8 +64,6 @@ declare class ExternalModulesExecutor {
|
|
|
64
64
|
resolveModule: (specifier: string, referencer: string) => Promise<VMModule>;
|
|
65
65
|
resolve(specifier: string, parent: string): string;
|
|
66
66
|
private findNearestPackageData;
|
|
67
|
-
private wrapCoreSyntheticModule;
|
|
68
|
-
private wrapCommonJsSynteticModule;
|
|
69
67
|
private getModuleInformation;
|
|
70
68
|
private createModule;
|
|
71
69
|
private get isNetworkSupported();
|
package/dist/execute.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { File as File$1, TaskResultPack as TaskResultPack$1, TaskEventPack, TaskPopulated, Suite as Suite$1, Test as Test$1, Custom as Custom$1, Task as Task$1, TaskBase as TaskBase$1, TaskResult as TaskResult$1, DoneCallback as DoneCallback$1, RuntimeContext as RuntimeContext$1, SuiteHooks as SuiteHooks$1, SequenceHooks as SequenceHooks$1, SequenceSetupFiles as SequenceSetupFiles$1 } from '@vitest/runner';
|
|
2
|
-
export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
import { S as SerializedTestSpecification,
|
|
2
|
+
export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskEventPack as RunnerTaskEventPack, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
+
import { S as SerializedTestSpecification, g as CoverageProvider$1, a as ReportContext$1, h as CoverageProviderModule$1, i as CoverageReporter$1, j as CoverageProviderName, k as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, l as CoverageIstanbulOptions$1, c as CoverageV8Options$1, m as CustomProviderOptions$1, n as Reporter$1, V as Vitest$1, o as BrowserScript$1, p as BrowserConfigOptions$1, q as BuiltinEnvironment$1, r as VitestEnvironment$1, P as Pool$1, s as PoolOptions$1, t as CSSModuleScopeStrategy$1, A as ApiConfig$1, u as VitestRunMode$1, D as DepsOptimizationOptions$1, v as TransformModePatterns$1, I as InlineConfig$1, w as TypecheckConfig$1, x as UserConfig$1, y as ResolvedConfig$1, z as ProjectConfig$1, U as UserWorkspaceConfig$1, E as BenchmarkUserOptions$1 } from './chunks/reporters.d.CfRkRKN2.js';
|
|
4
4
|
import { W as WorkerContext$1 } from './chunks/worker.d.CSFlSYJg.js';
|
|
5
5
|
import { R as RawErrsMap$1, T as TscErrorInfo$1, C as CollectLineNumbers$1, a as CollectLines$1, b as RootAndTarget$1, c as Context$1 } from './chunks/global.d.Cg2sEPIm.js';
|
|
6
6
|
import { b as Awaitable$1, U as UserConsoleLog, M as ModuleGraphData, P as ProvidedContext, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, a as EnvironmentReturn$1, V as VmEnvironmentReturn$1, E as Environment$1, R as ResolvedTestEnvironment$1, J as JSDOMOptions$1, H as HappyDOMOptions$1, f as EnvironmentOptions$1 } from './chunks/environment.d.C8UItCbf.js';
|
|
7
7
|
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d.C8UItCbf.js';
|
|
8
8
|
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.C58isfFm.js';
|
|
9
9
|
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.d.C58isfFm.js';
|
|
10
|
-
import './chunks/vite.d.
|
|
10
|
+
import './chunks/vite.d.4pkSbgmp.js';
|
|
11
11
|
import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.DevWltVl.js';
|
|
12
12
|
export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.DevWltVl.js';
|
|
13
13
|
import { ExpectStatic } from '@vitest/expect';
|
|
@@ -28,6 +28,7 @@ export { Bench as BenchFactory, Options as BenchOptions, Task as BenchTask, Task
|
|
|
28
28
|
import 'node:stream';
|
|
29
29
|
import 'vite';
|
|
30
30
|
import 'node:console';
|
|
31
|
+
import '@vitest/mocker';
|
|
31
32
|
import '@vitest/utils/source-map';
|
|
32
33
|
import '@vitest/pretty-format';
|
|
33
34
|
import 'vite-node';
|
|
@@ -37,7 +38,6 @@ import '@vitest/snapshot/manager';
|
|
|
37
38
|
import 'node:fs';
|
|
38
39
|
import 'node:worker_threads';
|
|
39
40
|
import '@vitest/snapshot/environment';
|
|
40
|
-
import '@vitest/mocker';
|
|
41
41
|
import '@vitest/runner/utils';
|
|
42
42
|
|
|
43
43
|
interface SourceMap {
|
|
@@ -619,4 +619,5 @@ type SerializableSpec = SerializedTestSpecification;
|
|
|
619
619
|
/** @deprecated import from `vitest/node` instead */
|
|
620
620
|
type BenchmarkUserOptions = BenchmarkUserOptions$1;
|
|
621
621
|
|
|
622
|
-
export {
|
|
622
|
+
export { ModuleGraphData, ProvidedContext, SerializedConfig, SerializedTestSpecification, UserConsoleLog, assertType, createExpect, globalExpect as expect, getRunningMode, inject, isFirstRun, isWatchMode, runOnce, vi, vitest };
|
|
623
|
+
export type { ApiConfig, ArgumentsType, Arrayable, AssertType, Awaitable, BaseCoverageOptions, BenchmarkUserOptions, BrowserConfigOptions, BrowserScript, BrowserUI, BuiltinEnvironment, CSSModuleScopeStrategy, CollectLineNumbers, CollectLines, Constructable, Context, CoverageIstanbulOptions, CoverageOptions, CoverageProvider, CoverageProviderModule, CoverageReporter, CoverageV8Options, Custom, CustomProviderOptions, DepsOptimizationOptions, DoneCallback, Environment, EnvironmentOptions, EnvironmentReturn, File, HappyDOMOptions, InlineConfig, JSDOMOptions, MutableArray, Nullable, Pool, PoolOptions, ProjectConfig, RawErrsMap, ReportContext, Reporter, ResolvedConfig, ResolvedCoverageOptions, ResolvedTestEnvironment, RootAndTarget, RuntimeContext, SequenceHooks, SequenceSetupFiles, SerializableSpec, Suite, SuiteHooks, Task, TaskBase, TaskResult, TaskResultPack, Test, TransformModePatterns, TransformResultWithSource, TscErrorInfo, TypecheckConfig, UserConfig, UserWorkspaceConfig, Vitest, VitestEnvironment, VitestRunMode, VitestUtils, VmEnvironmentReturn, WebSocketEvents, WebSocketHandlers, WebSocketRPC, WorkerContext, WorkerRPC };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.
|
|
2
|
-
export { i as isFirstRun, a as runOnce } from './chunks/run-once.
|
|
3
|
-
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.
|
|
4
|
-
export { b as bench } from './chunks/benchmark.
|
|
1
|
+
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.B-PuvDzu.js';
|
|
2
|
+
export { i as isFirstRun, a as runOnce } from './chunks/run-once.I7PpBOk1.js';
|
|
3
|
+
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.BDobFbcz.js';
|
|
4
|
+
export { b as bench } from './chunks/benchmark.BKUatJGy.js';
|
|
5
5
|
export { expectTypeOf } from 'expect-type';
|
|
6
6
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
7
7
|
import * as chai from 'chai';
|
|
@@ -9,11 +9,11 @@ export { chai };
|
|
|
9
9
|
export { assert, should } from 'chai';
|
|
10
10
|
import '@vitest/expect';
|
|
11
11
|
import '@vitest/runner/utils';
|
|
12
|
-
import './chunks/utils.
|
|
12
|
+
import './chunks/utils.CtocqOoE.js';
|
|
13
13
|
import '@vitest/utils';
|
|
14
14
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
15
15
|
import '@vitest/snapshot';
|
|
16
16
|
import '@vitest/utils/error';
|
|
17
17
|
import '@vitest/spy';
|
|
18
18
|
import '@vitest/utils/source-map';
|
|
19
|
-
import './chunks/date.
|
|
19
|
+
import './chunks/date.CDOsz-HY.js';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BaseCoverageOptions,
|
|
3
|
-
import { UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
|
|
1
|
+
import { y as ResolvedConfig, x as UserConfig, u as VitestRunMode, F as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, G as TestSequencer, H as TestSpecification, L as Logger, J as TestModule, M as ModuleDiagnostic } from './chunks/reporters.d.CfRkRKN2.js';
|
|
2
|
+
export { B as BaseCoverageOptions, E as BenchmarkUserOptions, ae as BrowserBuiltinProvider, af as BrowserCommand, ag as BrowserCommandContext, p as BrowserConfigOptions, ah as BrowserInstanceOption, ai as BrowserModuleMocker, aj as BrowserOrchestrator, ak as BrowserProvider, al as BrowserProviderInitializationOptions, am as BrowserProviderModule, an as BrowserProviderOptions, o as BrowserScript, ao as BrowserServerState, ap as BrowserServerStateSession, q as BuiltinEnvironment, aq as CDPSession, t as CSSModuleScopeStrategy, l as CoverageIstanbulOptions, k as CoverageOptions, g as CoverageProvider, h as CoverageProviderModule, i as CoverageReporter, c as CoverageV8Options, m as CustomProviderOptions, D as DepsOptimizationOptions, _ as HTMLOptions, I as InlineConfig, a0 as JUnitOptions, $ as JsonOptions, O as OnServerRestartHandler, K as OnTestsRerunHandler, ar as ParentProjectBrowser, P as Pool, s as PoolOptions, Q as ProcessPool, as as ProjectBrowser, z as ProjectConfig, a as ReportContext, ay as ReportedHookContext, n as Reporter, av as ResolveSnapshotPathHandler, aw as ResolveSnapshotPathHandlerContext, at as ResolvedBrowserOptions, R as ResolvedCoverageOptions, au as ResolvedProjectConfig, Z as SerializedTestProject, a1 as TaskOptions, a2 as TestCase, a3 as TestCollection, a4 as TestDiagnostic, a5 as TestModuleState, a6 as TestResult, a7 as TestResultFailed, a8 as TestResultPassed, a9 as TestResultSkipped, az as TestRunEndReason, ax as TestRunResult, ad as TestSequencerConstructor, aa as TestState, ab as TestSuite, ac as TestSuiteState, v as TransformModePatterns, w as TypecheckConfig, U as UserWorkspaceConfig, r as VitestEnvironment, N as VitestPackageInstaller, X as WorkspaceSpec, Y as getFilePoolName } from './chunks/reporters.d.CfRkRKN2.js';
|
|
3
|
+
import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
|
|
4
4
|
import * as vite from 'vite';
|
|
5
5
|
export { vite as Vite };
|
|
6
6
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
7
7
|
import { IncomingMessage } from 'node:http';
|
|
8
8
|
import { R as RuntimeRPC } from './chunks/worker.d.C58isfFm.js';
|
|
9
9
|
import { Writable } from 'node:stream';
|
|
10
|
+
export { V as VitestPluginContext } from './chunks/vite.d.4pkSbgmp.js';
|
|
10
11
|
export { W as WorkerContext } from './chunks/worker.d.CSFlSYJg.js';
|
|
11
12
|
export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.d.Cg2sEPIm.js';
|
|
12
13
|
import { Debugger } from 'debug';
|
|
@@ -14,9 +15,9 @@ export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as R
|
|
|
14
15
|
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.d.C8UItCbf.js';
|
|
15
16
|
export { SerializedError } from '@vitest/utils';
|
|
16
17
|
export { b as RuntimeConfig } from './chunks/config.d.DevWltVl.js';
|
|
17
|
-
import './chunks/vite.d.Fvq-NZoa.js';
|
|
18
18
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
19
19
|
import 'node:console';
|
|
20
|
+
import '@vitest/mocker';
|
|
20
21
|
import '@vitest/utils/source-map';
|
|
21
22
|
import '@vitest/pretty-format';
|
|
22
23
|
import '@vitest/snapshot';
|
|
@@ -52,6 +53,15 @@ interface CliOptions extends UserConfig {
|
|
|
52
53
|
* Output collected test files only
|
|
53
54
|
*/
|
|
54
55
|
filesOnly?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Override vite config's configLoader from cli.
|
|
58
|
+
* Use `bundle` to bundle the config with esbuild or `runner` (experimental) to process it on the fly (default: `bundle`).
|
|
59
|
+
* This is only available with **vite version 6.1.0** and above.
|
|
60
|
+
* @experimental
|
|
61
|
+
*/
|
|
62
|
+
configLoader?: InlineConfig extends {
|
|
63
|
+
configLoader?: infer T
|
|
64
|
+
} ? T : never;
|
|
55
65
|
}
|
|
56
66
|
/**
|
|
57
67
|
* Start Vitest programmatically
|
|
@@ -70,7 +80,7 @@ declare function parseCLI(argv: string | string[], config?: CliParseOptions): {
|
|
|
70
80
|
|
|
71
81
|
declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number): ApiConfig | undefined;
|
|
72
82
|
|
|
73
|
-
declare function createVitest(mode: VitestRunMode, options:
|
|
83
|
+
declare function createVitest(mode: VitestRunMode, options: CliOptions, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
74
84
|
|
|
75
85
|
declare class FilesNotFoundError extends Error {
|
|
76
86
|
code: string;
|
|
@@ -131,4 +141,5 @@ declare const TestFile: typeof TestModule;
|
|
|
131
141
|
*/
|
|
132
142
|
type FileDiagnostic = ModuleDiagnostic;
|
|
133
143
|
|
|
134
|
-
export { ApiConfig, BaseSequencer,
|
|
144
|
+
export { ApiConfig, BaseSequencer, GitNotFoundError, ModuleDiagnostic, ResolvedConfig, TestFile, TestModule, TestProject, TestSequencer, TestSpecification, FilesNotFoundError as TestsNotFoundError, UserConfig, Vitest, VitestOptions, VitestPlugin, VitestRunMode, TestProject as WorkspaceProject, createDebugger, createMethodsRPC, createServer, createViteLogger, createViteServer, createVitest, distDir, isValidApiRequest, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest, version };
|
|
145
|
+
export type { CliParseOptions, FileDiagnostic, GlobalSetupContext };
|