vitest 4.1.12 → 5.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 +192 -10
- package/browser/context.d.ts +7 -1
- package/browser/context.js +5 -5
- package/config.d.ts +0 -2
- package/dist/browser.d.ts +52 -21
- package/dist/browser.js +12 -13
- package/dist/chunks/{acorn.B2iPLyUM.js → acorn.C1kjbUFw.js} +30 -30
- package/dist/chunks/{base.B6Opl8PE.js → base.Cof-UHJf.js} +81 -52
- package/dist/chunks/{browser.d.BcoexmFG.d.ts → browser.d.C7tWgUvw.d.ts} +17 -14
- package/dist/chunks/{cac.DzDtg8hz.js → cac.BYbt0aJp.js} +143 -87
- package/dist/chunks/{cli-api.B0Pz1_R7.js → cli-api.COfZo8lK.js} +7160 -7189
- package/dist/chunks/config.d.B3YV4t0O.d.ts +3873 -0
- package/dist/chunks/{console.3WNpx0tS.js → console.CQZ877Hi.js} +69 -63
- package/dist/chunks/{constants.CPYnjOGj.js → constants.DLYM6cZY.js} +2 -2
- package/dist/chunks/coverage.9iqXE2gN.js +26 -0
- package/dist/chunks/{coverage.CTzCuANN.js → coverage.jGCktcGP.js} +7 -2
- package/dist/chunks/{creator.DgVhQm5q.js → creator.DHWmytIK.js} +65 -28
- package/dist/chunks/{defaults.9aQKnqFk.js → defaults.B1FCaFfh.js} +16 -9
- package/dist/chunks/display.BlTmubjj.js +194 -0
- package/dist/chunks/doctor.B-oPbwps.js +465 -0
- package/dist/chunks/{env.D4Lgay0q.js → env.BKKtU2WC.js} +2 -1
- package/dist/chunks/{environment.d.CrsxCzP1.d.ts → environment.d.BFQtFKdZ.d.ts} +9 -1
- package/dist/chunks/globals.ZKtKSkEf.js +29 -0
- package/dist/chunks/index.Bi0NXYPf.js +1708 -0
- package/dist/chunks/{index.CMESou6r.js → index.BoyTG_B7.js} +82 -81
- package/dist/chunks/index.CZzC1gGg.js +8501 -0
- package/dist/chunks/index.D0heQG4v.js +1318 -0
- package/dist/chunks/index.Di8au7q4.js +15665 -0
- package/dist/chunks/{index.Chj8NDwU.js → index.DmDMHCg8.js} +6 -12
- package/dist/chunks/{index.DXx9Dtk7.js → index.w_oBZ9N8.js} +25 -12
- package/dist/chunks/{init-forks.H5ZuobOQ.js → init-forks.BaDXQSD8.js} +7 -10
- package/dist/chunks/{init-threads.6kl1khcL.js → init-threads.ZX_Vov0z.js} +1 -1
- package/dist/chunks/{init.k9zZ9sLh.js → init.CO4AB7HZ.js} +113 -38
- package/dist/chunks/module-dependencies._2Eei3FO.js +71 -0
- package/dist/chunks/{native.DPzPHdi5.js → native.upB-V0CK.js} +50 -37
- package/dist/chunks/{nativeModuleMocker.BkNfQMkH.js → nativeModuleMocker.Dh5azSB4.js} +48 -19
- package/dist/chunks/{index.BCY_7LL2.js → nativeModuleRunner.9xPIMzi7.js} +110 -42
- package/dist/chunks/node.B9mkVmLH.js +47 -0
- package/dist/chunks/offset.Dy-5Fdfn.js +24 -0
- package/dist/chunks/pathe.M-eThtNZ.zq3TM4NT.js +492 -0
- package/dist/chunks/{reporters.d.DtoKVV2s.d.ts → plugin.d.LRFSN46m.d.ts} +2573 -1453
- package/dist/chunks/plugins.DPQHVT0p.js +37 -0
- package/dist/chunks/rawSnapshot.DqSiqIEx.js +356 -0
- package/dist/chunks/resolver.BzpmeQeT.js +48 -0
- package/dist/chunks/rpc.Uhkwr2NM.js +93 -0
- package/dist/chunks/rpc.d.3FOhdFx8.d.ts +75 -0
- package/dist/chunks/run.CjdgFZiW.js +4231 -0
- package/dist/chunks/setup-common.CqAQCXzx.js +36 -0
- package/dist/chunks/source-map.DakdQc29.js +1788 -0
- package/dist/chunks/source-map.d.BkG8YK_3.d.ts +89 -0
- package/dist/chunks/spy.DDMXghXv.js +509 -0
- package/dist/chunks/task-utils.d.D-gFPNFi.d.ts +144 -0
- package/dist/chunks/tinyrainbow.Do8I1XRG.js +88 -0
- package/dist/chunks/{utils.BS4fH3nR.js → utils.BBk_icFG.js} +50 -52
- package/dist/chunks/{utils.BX5Fg8C4.js → utils.DYj33du9.js} +1 -17
- package/dist/chunks/vm.b4MbCAJQ.js +1329 -0
- package/dist/chunks/{worker.d.ZpHpO4yb.d.ts → worker.d.CyJRpyfZ.d.ts} +34 -19
- package/dist/cli.js +5 -6
- package/dist/config.cjs +9 -6
- package/dist/config.d.ts +27 -25
- package/dist/config.js +3 -3
- package/dist/index.d.ts +471 -38
- package/dist/index.js +18 -19
- package/dist/module-evaluator.d.ts +64 -5
- package/dist/module-evaluator.js +122 -62
- package/dist/node.d.ts +355 -87
- package/dist/node.js +49 -73
- package/dist/runtime.d.ts +43 -6
- package/dist/runtime.js +7 -9
- package/dist/spy.js +1 -1
- package/dist/task-utils.js +290 -0
- package/dist/{chunks/traces.DT5aQ62U.js → traces.js} +3 -2
- package/dist/worker.d.ts +8 -10
- package/dist/worker.js +33 -43
- package/dist/workers/forks.js +30 -40
- package/dist/workers/runVmTests.js +66 -43
- package/dist/workers/threads.js +30 -40
- package/dist/workers/vmForks.js +19 -20
- package/dist/workers/vmThreads.js +19 -20
- package/globals.d.ts +19 -19
- package/index.cjs +3 -3
- package/optional-runtime-types.d.ts +1 -1
- package/optional-types.d.ts +1 -1
- package/package.json +59 -74
- package/suppress-warnings.cjs +1 -1
- package/dist/chunks/_commonjsHelpers.D26ty3Ew.js +0 -6
- package/dist/chunks/benchmark.CX_oY03V.js +0 -40
- package/dist/chunks/benchmark.d.DAaHLpsq.d.ts +0 -24
- package/dist/chunks/config.d.A1h_Y6Jt.d.ts +0 -232
- package/dist/chunks/coverage.DM_a_rWm.js +0 -1087
- package/dist/chunks/coverage.d.BZtK59WP.d.ts +0 -37
- package/dist/chunks/evaluatedModules.Dg1zASAC.js +0 -17
- package/dist/chunks/global.d.DVsSRdQ5.d.ts +0 -100
- package/dist/chunks/globals.Dj1TGiMC.js +0 -31
- package/dist/chunks/index.DC7d2Pf8.js +0 -729
- package/dist/chunks/index.DdgEv5B1.js +0 -42
- package/dist/chunks/index.UpGiHP7g.js +0 -4255
- package/dist/chunks/index.og1WyBLx.js +0 -6358
- package/dist/chunks/nativeModuleRunner.BIakptoF.js +0 -36
- package/dist/chunks/node.COQbm6gK.js +0 -14
- package/dist/chunks/plugin.d.DwFIiJ7i.d.ts +0 -38
- package/dist/chunks/rpc.MzXet3jl.js +0 -144
- package/dist/chunks/rpc.d.B_8sPU0w.d.ts +0 -30
- package/dist/chunks/setup-common.DYx3LtFI.js +0 -60
- package/dist/chunks/startVitestModuleRunner.DB-7oCpn.js +0 -740
- package/dist/chunks/suite.d.udJtyAgw.d.ts +0 -10
- package/dist/chunks/test.DNmyFkvJ.js +0 -4430
- package/dist/chunks/traces.d.D2T_R8rx.d.ts +0 -60
- package/dist/chunks/vm.CXMd5FHa.js +0 -785
- package/dist/coverage.d.ts +0 -123
- package/dist/coverage.js +0 -27
- package/dist/environments.d.ts +0 -22
- package/dist/environments.js +0 -5
- package/dist/reporters.d.ts +0 -27
- package/dist/reporters.js +0 -26
- package/dist/runners.d.ts +0 -70
- package/dist/runners.js +0 -19
- package/dist/snapshot.d.ts +0 -9
- package/dist/snapshot.js +0 -6
- package/dist/suite.d.ts +0 -5
- package/dist/suite.js +0 -8
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { runInThisContext } from 'node:vm';
|
|
2
|
-
import
|
|
3
|
-
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks, s as setupChaiConfig } from './index.
|
|
4
|
-
import { l as loadEnvironment, e as emitModuleRunner, a as listenForErrors } from './init.
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { V as VitestEvaluatedModules } from './
|
|
8
|
-
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './
|
|
2
|
+
import { s as spyModule } from './spy.DDMXghXv.js';
|
|
3
|
+
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks, s as setupChaiConfig } from './index.w_oBZ9N8.js';
|
|
4
|
+
import { l as loadEnvironment, e as emitModuleRunner, a as listenForErrors } from './init.CO4AB7HZ.js';
|
|
5
|
+
import { n as nativeImports, g as getEvaluatedImports, c as collectDependencies } from './module-dependencies._2Eei3FO.js';
|
|
6
|
+
import { Traces } from '../traces.js';
|
|
7
|
+
import { V as VitestEvaluatedModules } from './rpc.Uhkwr2NM.js';
|
|
8
|
+
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './index.Bi0NXYPf.js';
|
|
9
9
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { g as globalExpect, v as vi } from './test.DNmyFkvJ.js';
|
|
10
|
+
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './coverage.9iqXE2gN.js';
|
|
11
|
+
import { i as index, g as globalExpect, v as vi } from './index.CZzC1gGg.js';
|
|
13
12
|
import { c as closeInspector } from './inspector.CvyFGlXm.js';
|
|
14
|
-
import {
|
|
13
|
+
import { s as startTests, p as publicCollect } from './run.CjdgFZiW.js';
|
|
14
|
+
import { createRequire, syncBuiltinESMExports } from 'node:module';
|
|
15
15
|
import timers from 'node:timers';
|
|
16
16
|
import timersPromises from 'node:timers/promises';
|
|
17
17
|
import util from 'node:util';
|
|
18
|
-
import { KNOWN_ASSET_TYPES } from '
|
|
19
|
-
import {
|
|
20
|
-
import { g as getWorkerState, r as resetModules, p as provideWorkerState, a as getSafeWorkerState } from './utils.
|
|
18
|
+
import { K as KNOWN_ASSET_TYPES } from './pathe.M-eThtNZ.zq3TM4NT.js';
|
|
19
|
+
import { s as setupCommonEnv, b as setupEnv } from './setup-common.CqAQCXzx.js';
|
|
20
|
+
import { g as getWorkerState, r as resetModules, p as provideWorkerState, a as getSafeWorkerState } from './utils.DYj33du9.js';
|
|
21
21
|
|
|
22
22
|
// this should only be used in Node
|
|
23
23
|
let globalSetup = false;
|
|
@@ -47,7 +47,8 @@ async function setupGlobalEnv(config, environment) {
|
|
|
47
47
|
globalThis.__vitest_required__ = {
|
|
48
48
|
util,
|
|
49
49
|
timers,
|
|
50
|
-
timersPromises
|
|
50
|
+
timersPromises,
|
|
51
|
+
syncBuiltinESMExports
|
|
51
52
|
};
|
|
52
53
|
if (!config.disableConsoleIntercept) await setupConsoleLogSpy();
|
|
53
54
|
}
|
|
@@ -58,7 +59,7 @@ function resolveAsset(mod, url) {
|
|
|
58
59
|
mod.exports = url;
|
|
59
60
|
}
|
|
60
61
|
async function setupConsoleLogSpy() {
|
|
61
|
-
const { createCustomConsole } = await import('./console.
|
|
62
|
+
const { createCustomConsole } = await import('./console.CQZ877Hi.js');
|
|
62
63
|
globalThis.console = createCustomConsole();
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -73,30 +74,41 @@ async function run(method, files, config, moduleRunner, environment, traces) {
|
|
|
73
74
|
if (!workerState.config.snapshotOptions.snapshotEnvironment) workerState.config.snapshotOptions.snapshotEnvironment = await resolveSnapshotEnvironment(config, moduleRunner);
|
|
74
75
|
})
|
|
75
76
|
]);
|
|
76
|
-
workerState.onCancel((reason) => {
|
|
77
|
+
const offCancel = workerState.onCancel((reason) => {
|
|
77
78
|
closeInspector(config);
|
|
78
79
|
testRunner.cancel?.(reason);
|
|
79
80
|
});
|
|
80
81
|
workerState.durations.prepare = performance$1.now() - workerState.durations.prepare;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
// modules loaded before the first file are shared by every file in this worker
|
|
83
|
+
const dependencies = workerState.dependencies;
|
|
84
|
+
const preparedModules = new Set(dependencies);
|
|
85
|
+
const getImports = config.experimental.viteModuleRunner === false ? nativeImports.getImports : getEvaluatedImports(workerState.evaluatedModules);
|
|
86
|
+
try {
|
|
87
|
+
await traces.$(`vitest.test.runner.${method}`, async () => {
|
|
88
|
+
for (const file of files) {
|
|
89
|
+
if (config.isolate) {
|
|
90
|
+
moduleRunner.mocker?.reset();
|
|
91
|
+
resetModules(workerState.evaluatedModules, true);
|
|
92
|
+
}
|
|
93
|
+
workerState.filepath = file.filepath;
|
|
94
|
+
dependencies?.clear();
|
|
95
|
+
if (method === "run") {
|
|
96
|
+
const collectAsyncLeaks = config.detectAsyncLeaks ? detectAsyncLeaks(file.filepath, workerState.ctx.projectName) : void 0;
|
|
97
|
+
await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => startTests([file], testRunner));
|
|
98
|
+
if (dependencies) workerState.rpc.onTestModuleDependencies(file.filepath, collectDependencies(getImports, preparedModules, dependencies));
|
|
99
|
+
const leaks = await collectAsyncLeaks?.();
|
|
100
|
+
if (leaks?.length) workerState.rpc.onAsyncLeaks(leaks);
|
|
101
|
+
} else await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => publicCollect([file], testRunner));
|
|
102
|
+
// reset after tests, because user might call `vi.setConfig` in setupFile
|
|
103
|
+
vi.resetConfig();
|
|
104
|
+
// mocks should not affect different files
|
|
105
|
+
vi.restoreAllMocks();
|
|
84
106
|
moduleRunner.mocker?.reset();
|
|
85
|
-
resetModules(workerState.evaluatedModules, true);
|
|
86
107
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const leaks = await collectAsyncLeaks?.();
|
|
92
|
-
if (leaks?.length) workerState.rpc.onAsyncLeaks(leaks);
|
|
93
|
-
} else await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => collectTests([file], testRunner));
|
|
94
|
-
// reset after tests, because user might call `vi.setConfig` in setupFile
|
|
95
|
-
vi.resetConfig();
|
|
96
|
-
// mocks should not affect different files
|
|
97
|
-
vi.restoreAllMocks();
|
|
98
|
-
}
|
|
99
|
-
});
|
|
108
|
+
});
|
|
109
|
+
} finally {
|
|
110
|
+
offCancel();
|
|
111
|
+
}
|
|
100
112
|
await traces.$("vitest.runtime.coverage.stop", () => stopCoverageInsideWorker(config.coverage, moduleRunner, { isolate: config.isolate }));
|
|
101
113
|
}
|
|
102
114
|
|
|
@@ -105,17 +117,18 @@ const evaluatedModules = new VitestEvaluatedModules();
|
|
|
105
117
|
const moduleExecutionInfo = /* @__PURE__ */ new Map();
|
|
106
118
|
async function startModuleRunner(options) {
|
|
107
119
|
if (_moduleRunner) return _moduleRunner;
|
|
120
|
+
const state = () => getSafeWorkerState() || options.state;
|
|
108
121
|
process.exit = (code = process.exitCode || 0) => {
|
|
109
|
-
|
|
122
|
+
const filepath = state().filepath;
|
|
123
|
+
throw new Error(`process.exit unexpectedly called with "${code}"${filepath ? ` (test file: ${filepath})` : ""}`);
|
|
110
124
|
};
|
|
111
|
-
const state = () => getSafeWorkerState() || options.state;
|
|
112
125
|
listenForErrors(state);
|
|
113
126
|
if (options.state.config.experimental.viteModuleRunner === false) {
|
|
114
127
|
const root = options.state.config.root;
|
|
115
128
|
let mocker;
|
|
116
129
|
if (options.state.config.experimental.nodeLoader !== false) {
|
|
117
130
|
// this additionally imports acorn/magic-string
|
|
118
|
-
const { NativeModuleMocker } = await import('./nativeModuleMocker.
|
|
131
|
+
const { NativeModuleMocker } = await import('./nativeModuleMocker.Dh5azSB4.js');
|
|
119
132
|
mocker = new NativeModuleMocker({
|
|
120
133
|
async resolveId(id, importer) {
|
|
121
134
|
// TODO: use import.meta.resolve instead
|
|
@@ -130,6 +143,9 @@ async function startModuleRunner(options) {
|
|
|
130
143
|
spyModule
|
|
131
144
|
});
|
|
132
145
|
}
|
|
146
|
+
// imported lazily (pulls in `local-pkg`) so it stays out of the default
|
|
147
|
+
// worker startup graph; only the `viteModuleRunner: false` path needs it
|
|
148
|
+
const { NativeModuleRunner } = await import('./nativeModuleRunner.9xPIMzi7.js').then(function (n) { return n.n; });
|
|
133
149
|
_moduleRunner = new NativeModuleRunner(root, mocker);
|
|
134
150
|
return _moduleRunner;
|
|
135
151
|
}
|
|
@@ -137,27 +153,31 @@ async function startModuleRunner(options) {
|
|
|
137
153
|
return _moduleRunner;
|
|
138
154
|
}
|
|
139
155
|
let _currentEnvironment;
|
|
156
|
+
let _environmentModules = [];
|
|
140
157
|
let _environmentTime;
|
|
158
|
+
// the files reported by the resolve hook are added here when the module runner is disabled
|
|
159
|
+
let _nativeDependencies;
|
|
160
|
+
let _canRecordDependencies = true;
|
|
161
|
+
function recordNativeImport(url, parentURL) {
|
|
162
|
+
const file = nativeImports.record(url, parentURL);
|
|
163
|
+
if (file) _nativeDependencies?.add(file);
|
|
164
|
+
}
|
|
141
165
|
/** @experimental */
|
|
142
166
|
async function setupBaseEnvironment(context) {
|
|
143
167
|
if (context.config.experimental.viteModuleRunner === false) {
|
|
144
|
-
const { setupNodeLoaderHooks } = await import('./native.
|
|
145
|
-
|
|
168
|
+
const { setupNodeLoaderHooks } = await import('./native.upB-V0CK.js');
|
|
169
|
+
const recordDependencies = context.config.experimental.recordDependencies;
|
|
170
|
+
_canRecordDependencies = await setupNodeLoaderHooks(context, recordDependencies ? recordNativeImport : void 0);
|
|
171
|
+
// until the tests start, the imports belong to the environment
|
|
172
|
+
_nativeDependencies = recordDependencies ? /* @__PURE__ */ new Set() : void 0;
|
|
146
173
|
}
|
|
147
174
|
const startTime = performance.now();
|
|
148
175
|
const { environment: { name: environmentName, options: environmentOptions }, rpc, config } = context;
|
|
149
|
-
|
|
150
|
-
if (context.config.serializedDefines) try {
|
|
151
|
-
runInThisContext(`(() =>{\n${context.config.serializedDefines}})()`, {
|
|
152
|
-
lineOffset: 1,
|
|
153
|
-
filename: "virtual:load-defines.js"
|
|
154
|
-
});
|
|
155
|
-
} catch (error) {
|
|
156
|
-
throw new Error(`Failed to load custom "defines": ${error.message}`);
|
|
157
|
-
}
|
|
176
|
+
setupEnv(config.env, context.metaEnv);
|
|
158
177
|
const otel = context.traces;
|
|
159
178
|
const { environment, loader } = await loadEnvironment(environmentName, config.root, rpc, otel, context.config.experimental.viteModuleRunner);
|
|
160
179
|
_currentEnvironment = environment;
|
|
180
|
+
_environmentModules = loader ? Array.from(loader.evaluatedModules.idToModuleMap.keys()) : _nativeDependencies ?? [];
|
|
161
181
|
const env = await otel.$("vitest.runtime.environment.setup", { attributes: {
|
|
162
182
|
"vitest.environment": environment.name,
|
|
163
183
|
"vitest.environment.vite_environment": environment.viteEnvironment || environment.name
|
|
@@ -177,12 +197,21 @@ async function runBaseTests(method, state, traces) {
|
|
|
177
197
|
// state has new context, but we want to reuse existing ones
|
|
178
198
|
state.evaluatedModules = evaluatedModules;
|
|
179
199
|
state.moduleExecutionInfo = moduleExecutionInfo;
|
|
200
|
+
if (!_canRecordDependencies)
|
|
201
|
+
// a test file without a record always runs
|
|
202
|
+
state.dependencies = void 0;
|
|
203
|
+
for (const id of _environmentModules) state.dependencies?.add(id);
|
|
204
|
+
if (_nativeDependencies) _nativeDependencies = state.dependencies;
|
|
180
205
|
provideWorkerState(globalThis, state);
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
206
|
+
// we could load @vite/env, but it would take ~8ms, while this takes ~0,02ms
|
|
207
|
+
if (state.config.serializedDefines) try {
|
|
208
|
+
runInThisContext(`(() =>{\n${state.config.serializedDefines}})()`, {
|
|
209
|
+
lineOffset: 1,
|
|
210
|
+
filename: "virtual:load-defines.js"
|
|
184
211
|
});
|
|
185
|
-
})
|
|
212
|
+
} catch (error) {
|
|
213
|
+
throw new Error(`Failed to load custom "defines": ${error.message}`);
|
|
214
|
+
}
|
|
186
215
|
ctx.files.forEach((i) => {
|
|
187
216
|
const filepath = i.filepath;
|
|
188
217
|
(state.evaluatedModules.fileToModulesMap.get(filepath) || []).forEach((module) => {
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import { FileSpecification } from '
|
|
2
|
-
import { O as OTELCarrier } from './
|
|
3
|
-
import { T as TestExecutionMethod } from './worker.d.
|
|
4
|
-
|
|
5
|
-
type SerializedTestSpecification = [project: {
|
|
6
|
-
name: string | undefined;
|
|
7
|
-
root: string;
|
|
8
|
-
}, file: string, options: {
|
|
9
|
-
pool: string;
|
|
10
|
-
testLines?: number[] | undefined;
|
|
11
|
-
testIds?: string[] | undefined;
|
|
12
|
-
testNamePattern?: RegExp | undefined;
|
|
13
|
-
testTagsFilter?: string[] | undefined;
|
|
14
|
-
}];
|
|
1
|
+
import { F as FileSpecification } from './config.d.B3YV4t0O.js';
|
|
2
|
+
import { O as OTELCarrier } from './rpc.d.3FOhdFx8.js';
|
|
3
|
+
import { T as TestExecutionMethod } from './worker.d.CyJRpyfZ.js';
|
|
15
4
|
|
|
16
5
|
interface ModuleDefinitionLocation {
|
|
17
6
|
line: number;
|
|
@@ -52,11 +41,25 @@ interface SourceModuleDiagnostic {
|
|
|
52
41
|
untrackedModules: UntrackedModuleDefinitionDiagnostic[];
|
|
53
42
|
}
|
|
54
43
|
|
|
44
|
+
type SerializedTestSpecification = [project: {
|
|
45
|
+
name: string | undefined;
|
|
46
|
+
root: string;
|
|
47
|
+
}, file: string, options: {
|
|
48
|
+
pool: string;
|
|
49
|
+
testLines?: number[] | undefined;
|
|
50
|
+
testIds?: string[] | undefined;
|
|
51
|
+
testNames?: string[] | undefined;
|
|
52
|
+
testNamePattern?: RegExp | undefined;
|
|
53
|
+
testTagsFilter?: string[] | undefined;
|
|
54
|
+
}];
|
|
55
|
+
|
|
55
56
|
interface BrowserTesterOptions {
|
|
56
57
|
method: TestExecutionMethod;
|
|
57
58
|
files: FileSpecification[];
|
|
58
59
|
providedContext: string;
|
|
59
60
|
otelCarrier?: OTELCarrier;
|
|
61
|
+
concurrencyId: number;
|
|
62
|
+
workerId: number;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
export type { BrowserTesterOptions as B, ModuleDefinitionDurationsDiagnostic as M, SerializedTestSpecification as S, UntrackedModuleDefinitionDiagnostic as U, ModuleDefinitionDiagnostic as a, ModuleDefinitionLocation as b, SourceModuleDiagnostic as c, SourceModuleLocations as d };
|