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,8 +1,7 @@
|
|
|
1
|
-
import { FileSpecification, Task, CancelReason } from '@vitest/runner';
|
|
2
1
|
import { EvaluatedModules } from 'vite/module-runner';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { F as FileSpecification, b as SerializedConfig, Y as Task, Z as CancelReason } from './config.d.B3YV4t0O.js';
|
|
3
|
+
import { a as RuntimeRPC, R as RunnerRPC, G as GetterTracker } from './rpc.d.3FOhdFx8.js';
|
|
4
|
+
import { E as Environment } from './environment.d.BFQtFKdZ.js';
|
|
6
5
|
|
|
7
6
|
//#region src/messages.d.ts
|
|
8
7
|
declare const TYPE_REQUEST: "q";
|
|
@@ -157,15 +156,15 @@ interface BirpcReturnBuiltin<RemoteFunctions, LocalFunctions = Record<string, un
|
|
|
157
156
|
* Call the remote function and wait for the result.
|
|
158
157
|
* An alternative to directly calling the function
|
|
159
158
|
*/
|
|
160
|
-
$call: <K
|
|
159
|
+
$call: <K extends keyof RemoteFunctions>(method: K, ...args: ArgumentsType<RemoteFunctions[K]>) => Promise<Awaited<ReturnType<RemoteFunctions[K]>>>;
|
|
161
160
|
/**
|
|
162
161
|
* Same as `$call`, but returns `undefined` if the function is not defined on the remote side.
|
|
163
162
|
*/
|
|
164
|
-
$callOptional: <K
|
|
163
|
+
$callOptional: <K extends keyof RemoteFunctions>(method: K, ...args: ArgumentsType<RemoteFunctions[K]>) => Promise<Awaited<ReturnType<RemoteFunctions[K]> | undefined>>;
|
|
165
164
|
/**
|
|
166
165
|
* Send event without asking for response
|
|
167
166
|
*/
|
|
168
|
-
$callEvent: <K
|
|
167
|
+
$callEvent: <K extends keyof RemoteFunctions>(method: K, ...args: ArgumentsType<RemoteFunctions[K]>) => Promise<void>;
|
|
169
168
|
/**
|
|
170
169
|
* Call the remote function with the raw options.
|
|
171
170
|
*/
|
|
@@ -176,7 +175,7 @@ interface BirpcReturnBuiltin<RemoteFunctions, LocalFunctions = Record<string, un
|
|
|
176
175
|
optional?: boolean;
|
|
177
176
|
}) => Promise<Awaited<ReturnType<any>>[]>;
|
|
178
177
|
}
|
|
179
|
-
type ProxifiedRemoteFunctions<RemoteFunctions extends object = Record<string, unknown>> = { [K in keyof RemoteFunctions]: BirpcFn<RemoteFunctions[K]
|
|
178
|
+
type ProxifiedRemoteFunctions<RemoteFunctions extends object = Record<string, unknown>> = { [K in keyof RemoteFunctions]: BirpcFn<RemoteFunctions[K]>; };
|
|
180
179
|
type BirpcReturn<RemoteFunctions extends object = Record<string, unknown>, LocalFunctions extends object = Record<string, unknown>, Proxify extends boolean = true> = Proxify extends true ? ProxifiedRemoteFunctions<RemoteFunctions> & BirpcReturnBuiltin<RemoteFunctions, LocalFunctions> : BirpcReturnBuiltin<RemoteFunctions, LocalFunctions>;
|
|
181
180
|
type PendingCallHandler = (options: Pick<PromiseEntry, 'method' | 'reject'>) => void | Promise<void>;
|
|
182
181
|
interface PromiseEntry {
|
|
@@ -185,7 +184,7 @@ interface PromiseEntry {
|
|
|
185
184
|
method: string;
|
|
186
185
|
timeoutId?: ReturnType<typeof setTimeout>;
|
|
187
186
|
}
|
|
188
|
-
declare const setTimeout:
|
|
187
|
+
declare const setTimeout: any;
|
|
189
188
|
|
|
190
189
|
type WorkerRPC = BirpcReturn<RuntimeRPC, RunnerRPC>;
|
|
191
190
|
interface ContextTestEnvironment {
|
|
@@ -205,17 +204,27 @@ interface WorkerExecuteContext {
|
|
|
205
204
|
/** Exposed to test runner as `VITEST_WORKER_ID`. Value is unique per each isolated worker. */
|
|
206
205
|
workerId: number;
|
|
207
206
|
}
|
|
207
|
+
interface MetaEnv {
|
|
208
|
+
[key: string]: any;
|
|
209
|
+
BASE_URL: string;
|
|
210
|
+
MODE: string;
|
|
211
|
+
DEV: boolean;
|
|
212
|
+
PROD: boolean;
|
|
213
|
+
SSR: boolean;
|
|
214
|
+
}
|
|
208
215
|
interface ContextRPC {
|
|
209
216
|
pool: string;
|
|
210
217
|
config: SerializedConfig;
|
|
211
218
|
projectName: string;
|
|
212
219
|
environment: WorkerTestEnvironment;
|
|
213
220
|
rpc: WorkerRPC;
|
|
221
|
+
metaEnv: MetaEnv;
|
|
214
222
|
files: FileSpecification[];
|
|
215
223
|
providedContext: Record<string, any>;
|
|
216
224
|
invalidates?: string[];
|
|
217
225
|
/** Exposed to test runner as `VITEST_WORKER_ID`. Value is unique per each isolated worker. */
|
|
218
226
|
workerId: number;
|
|
227
|
+
concurrencyId: number;
|
|
219
228
|
}
|
|
220
229
|
interface WorkerSetupContext {
|
|
221
230
|
environment: WorkerTestEnvironment;
|
|
@@ -223,6 +232,7 @@ interface WorkerSetupContext {
|
|
|
223
232
|
config: SerializedConfig;
|
|
224
233
|
projectName: string;
|
|
225
234
|
rpc: WorkerRPC;
|
|
235
|
+
metaEnv: MetaEnv;
|
|
226
236
|
}
|
|
227
237
|
interface WorkerGlobalState {
|
|
228
238
|
ctx: ContextRPC;
|
|
@@ -230,26 +240,31 @@ interface WorkerGlobalState {
|
|
|
230
240
|
rpc: WorkerRPC;
|
|
231
241
|
current?: Task;
|
|
232
242
|
filepath?: string;
|
|
233
|
-
metaEnv:
|
|
234
|
-
|
|
235
|
-
BASE_URL: string;
|
|
236
|
-
MODE: string;
|
|
237
|
-
DEV: boolean;
|
|
238
|
-
PROD: boolean;
|
|
239
|
-
SSR: boolean;
|
|
240
|
-
};
|
|
243
|
+
metaEnv: MetaEnv;
|
|
244
|
+
metaDefines?: Record<string, any>;
|
|
241
245
|
environment: Environment;
|
|
242
246
|
evaluatedModules: EvaluatedModules;
|
|
243
247
|
resolvingModules: Set<string>;
|
|
244
248
|
moduleExecutionInfo: Map<string, any>;
|
|
245
|
-
|
|
249
|
+
/**
|
|
250
|
+
* Module ids and file paths loaded by the current test file. Only set when
|
|
251
|
+
* `experimental.recordDependencies` is enabled.
|
|
252
|
+
*/
|
|
253
|
+
dependencies?: Set<string>;
|
|
254
|
+
getterTracker?: GetterTracker;
|
|
255
|
+
onCancel: (listener: (reason: CancelReason) => unknown) => () => void;
|
|
246
256
|
onCleanup: (listener: () => unknown) => void;
|
|
247
257
|
providedContext: Record<string, any>;
|
|
248
258
|
durations: {
|
|
249
259
|
environment: number;
|
|
250
260
|
prepare: number;
|
|
261
|
+
/**
|
|
262
|
+
* Wall time the worker spent blocked on module fetch requests to the
|
|
263
|
+
* server, measured as the union of in-flight intervals.
|
|
264
|
+
*/
|
|
265
|
+
fetch: number;
|
|
251
266
|
};
|
|
252
267
|
onFilterStackTrace?: (trace: string) => string;
|
|
253
268
|
}
|
|
254
269
|
|
|
255
|
-
export type {
|
|
270
|
+
export type { BirpcReturn as B, ContextRPC as C, TestExecutionMethod as T, WorkerGlobalState as W, ContextTestEnvironment as a, WorkerExecuteContext as b, WorkerTestEnvironment as c, WorkerSetupContext as d, BirpcOptions as e };
|
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { c as createCLI } from './chunks/cac.
|
|
2
|
-
import '
|
|
1
|
+
import { c as createCLI } from './chunks/cac.BYbt0aJp.js';
|
|
2
|
+
import './chunks/pathe.M-eThtNZ.zq3TM4NT.js';
|
|
3
3
|
import 'events';
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import './chunks/env.D4Lgay0q.js';
|
|
4
|
+
import './chunks/tinyrainbow.Do8I1XRG.js';
|
|
5
|
+
import './chunks/env.BKKtU2WC.js';
|
|
7
6
|
import 'std-env';
|
|
8
|
-
import './chunks/constants.
|
|
7
|
+
import './chunks/constants.DLYM6cZY.js';
|
|
9
8
|
import 'node:assert';
|
|
10
9
|
|
|
11
10
|
createCLI().parse();
|
package/dist/config.cjs
CHANGED
|
@@ -10,7 +10,7 @@ const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.ve
|
|
|
10
10
|
(isNode || isDeno) && process.stdout?.isTTY && !stdEnv.isCI;
|
|
11
11
|
|
|
12
12
|
// if changed, update also jsdocs and docs
|
|
13
|
-
const defaultBrowserPort =
|
|
13
|
+
const defaultBrowserPort = 23315;
|
|
14
14
|
|
|
15
15
|
const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
|
|
16
16
|
const defaultExclude = ["**/node_modules/**", "**/.git/**"];
|
|
@@ -31,7 +31,7 @@ const coverageConfigDefaults = {
|
|
|
31
31
|
],
|
|
32
32
|
allowExternal: false,
|
|
33
33
|
excludeAfterRemap: false,
|
|
34
|
-
processingConcurrency: Math.min(20, os.availableParallelism
|
|
34
|
+
processingConcurrency: Math.min(20, os.availableParallelism()),
|
|
35
35
|
ignoreClassMethods: [],
|
|
36
36
|
skipFull: false,
|
|
37
37
|
watermarks: {
|
|
@@ -39,7 +39,8 @@ const coverageConfigDefaults = {
|
|
|
39
39
|
functions: [50, 80],
|
|
40
40
|
branches: [50, 80],
|
|
41
41
|
lines: [50, 80]
|
|
42
|
-
}
|
|
42
|
+
},
|
|
43
|
+
autoAttachSubprocess: false
|
|
43
44
|
};
|
|
44
45
|
const fakeTimersDefaults = {
|
|
45
46
|
loopLimit: 1e4,
|
|
@@ -50,8 +51,9 @@ const configDefaults = Object.freeze({
|
|
|
50
51
|
isolate: true,
|
|
51
52
|
watch: !stdEnv.isCI && process.stdin.isTTY && !stdEnv.isAgent,
|
|
52
53
|
globals: false,
|
|
54
|
+
injectCjsGlobals: true,
|
|
53
55
|
environment: "node",
|
|
54
|
-
clearMocks:
|
|
56
|
+
clearMocks: true,
|
|
55
57
|
restoreMocks: false,
|
|
56
58
|
mockReset: false,
|
|
57
59
|
unstubGlobals: false,
|
|
@@ -59,9 +61,9 @@ const configDefaults = Object.freeze({
|
|
|
59
61
|
include: defaultInclude,
|
|
60
62
|
exclude: defaultExclude,
|
|
61
63
|
teardownTimeout: 1e4,
|
|
62
|
-
forceRerunTriggers: ["**/package.json
|
|
64
|
+
forceRerunTriggers: ["**/package.json", "**/{vitest,vite}.config.*"],
|
|
63
65
|
update: false,
|
|
64
|
-
reporters: [],
|
|
66
|
+
reporters: [stdEnv.isAgent ? "minimal" : "default", ...process.env.GITHUB_ACTIONS === "true" ? ["github-actions"] : []],
|
|
65
67
|
silent: false,
|
|
66
68
|
hideSkippedTests: false,
|
|
67
69
|
api: false,
|
|
@@ -79,6 +81,7 @@ const configDefaults = Object.freeze({
|
|
|
79
81
|
exclude: defaultExclude
|
|
80
82
|
},
|
|
81
83
|
slowTestThreshold: 300,
|
|
84
|
+
taskTitleValueFormatTruncate: 40,
|
|
82
85
|
disableConsoleIntercept: false,
|
|
83
86
|
detectAsyncLeaks: false
|
|
84
87
|
});
|
package/dist/config.d.ts
CHANGED
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
import { HookHandler, UserConfig, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
export { TestTagDefinition } from '
|
|
8
|
-
import '@vitest/utils';
|
|
9
|
-
import './chunks/traces.d.D2T_R8rx.js';
|
|
3
|
+
import { F as FieldsWithDefaultValues, U as UserWorkspaceConfig, a as UserProjectConfigFn, b as UserProjectConfigExport } from './chunks/plugin.d.LRFSN46m.js';
|
|
4
|
+
import { InlineConfig, ResolvedConfig, VitestPluginContext, CoverageOptions } from './node.js';
|
|
5
|
+
export { T as TestProjectConfiguration, c as TestProjectInlineConfiguration, d as TestUserConfig, W as WatcherTriggerPattern } from './chunks/plugin.d.LRFSN46m.js';
|
|
6
|
+
import { FakeTimersConfig } from './index.js';
|
|
7
|
+
export { g as TestTagDefinition } from './chunks/config.d.B3YV4t0O.js';
|
|
10
8
|
import 'node:stream';
|
|
11
|
-
import './chunks/browser.d.
|
|
12
|
-
import './chunks/
|
|
9
|
+
import './chunks/browser.d.C7tWgUvw.js';
|
|
10
|
+
import './chunks/rpc.d.3FOhdFx8.js';
|
|
13
11
|
import 'vite/module-runner';
|
|
14
|
-
import './chunks/
|
|
15
|
-
import './chunks/
|
|
16
|
-
import '
|
|
17
|
-
import '@vitest/pretty-format';
|
|
18
|
-
import '@vitest/utils/diff';
|
|
19
|
-
import '@vitest/expect';
|
|
12
|
+
import './chunks/worker.d.CyJRpyfZ.js';
|
|
13
|
+
import './chunks/environment.d.BFQtFKdZ.js';
|
|
14
|
+
import 'chai';
|
|
20
15
|
import 'vitest/optional-types.js';
|
|
21
|
-
import './chunks/benchmark.d.DAaHLpsq.js';
|
|
22
|
-
import '@vitest/runner/utils';
|
|
23
|
-
import 'tinybench';
|
|
24
16
|
import '@vitest/mocker';
|
|
25
|
-
import '
|
|
17
|
+
import './chunks/source-map.d.BkG8YK_3.js';
|
|
26
18
|
import 'vitest/browser';
|
|
27
|
-
import '
|
|
28
|
-
import '@vitest/snapshot/manager';
|
|
19
|
+
import 'node:path';
|
|
29
20
|
import 'node:console';
|
|
30
|
-
import 'node:fs';
|
|
21
|
+
import 'node:fs/promises';
|
|
22
|
+
import 'vitest/optional-runtime-types.js';
|
|
23
|
+
import 'tinybench';
|
|
31
24
|
|
|
32
25
|
type VitestInlineConfig = InlineConfig;
|
|
26
|
+
type VitestResolvedConfig = ResolvedConfig;
|
|
33
27
|
declare module "vite" {
|
|
34
28
|
interface UserConfig {
|
|
35
29
|
/**
|
|
@@ -37,12 +31,18 @@ declare module "vite" {
|
|
|
37
31
|
*/
|
|
38
32
|
test?: VitestInlineConfig;
|
|
39
33
|
}
|
|
34
|
+
interface ResolvedConfig {
|
|
35
|
+
/**
|
|
36
|
+
* Options for Vitest
|
|
37
|
+
*/
|
|
38
|
+
test: VitestResolvedConfig;
|
|
39
|
+
}
|
|
40
40
|
interface Plugin<A = any> {
|
|
41
41
|
configureVitest?: HookHandler<(context: VitestPluginContext) => void>;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
declare const defaultBrowserPort =
|
|
45
|
+
declare const defaultBrowserPort = 23315;
|
|
46
46
|
|
|
47
47
|
declare const defaultInclude: string[];
|
|
48
48
|
declare const defaultExclude: string[];
|
|
@@ -52,6 +52,7 @@ declare const configDefaults: Readonly<{
|
|
|
52
52
|
isolate: boolean;
|
|
53
53
|
watch: boolean;
|
|
54
54
|
globals: boolean;
|
|
55
|
+
injectCjsGlobals: boolean;
|
|
55
56
|
environment: "node";
|
|
56
57
|
clearMocks: boolean;
|
|
57
58
|
restoreMocks: boolean;
|
|
@@ -63,7 +64,7 @@ declare const configDefaults: Readonly<{
|
|
|
63
64
|
teardownTimeout: number;
|
|
64
65
|
forceRerunTriggers: string[];
|
|
65
66
|
update: boolean;
|
|
66
|
-
reporters:
|
|
67
|
+
reporters: string[];
|
|
67
68
|
silent: boolean;
|
|
68
69
|
hideSkippedTests: boolean;
|
|
69
70
|
api: boolean;
|
|
@@ -74,7 +75,7 @@ declare const configDefaults: Readonly<{
|
|
|
74
75
|
include: never[];
|
|
75
76
|
};
|
|
76
77
|
coverage: CoverageOptions;
|
|
77
|
-
fakeTimers:
|
|
78
|
+
fakeTimers: FakeTimersConfig;
|
|
78
79
|
maxConcurrency: number;
|
|
79
80
|
dangerouslyIgnoreUnhandledErrors: boolean;
|
|
80
81
|
typecheck: {
|
|
@@ -83,6 +84,7 @@ declare const configDefaults: Readonly<{
|
|
|
83
84
|
exclude: string[];
|
|
84
85
|
};
|
|
85
86
|
slowTestThreshold: number;
|
|
87
|
+
taskTitleValueFormatTruncate: number;
|
|
86
88
|
disableConsoleIntercept: boolean;
|
|
87
89
|
detectAsyncLeaks: boolean;
|
|
88
90
|
}>;
|
package/dist/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { c as configDefaults, a as coverageConfigDefaults, d as defaultExclude, b as defaultInclude } from './chunks/defaults.
|
|
1
|
+
export { c as configDefaults, a as coverageConfigDefaults, d as defaultExclude, b as defaultInclude } from './chunks/defaults.B1FCaFfh.js';
|
|
2
2
|
export { mergeConfig } from 'vite';
|
|
3
|
-
export { d as defaultBrowserPort } from './chunks/constants.
|
|
3
|
+
export { d as defaultBrowserPort } from './chunks/constants.DLYM6cZY.js';
|
|
4
4
|
import 'node:os';
|
|
5
|
-
import './chunks/env.
|
|
5
|
+
import './chunks/env.BKKtU2WC.js';
|
|
6
6
|
import 'std-env';
|
|
7
7
|
|
|
8
8
|
function defineConfig(config) {
|