vitest 2.0.4 → 2.0.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/dist/browser.d.ts +21 -42
- package/dist/browser.js +5 -5
- package/dist/{vendor/base.Csk7BT3h.js → chunks/base.CC5R_kgU.js} +3 -3
- package/dist/{vendor/base.DRHPZCCj.js → chunks/base.DSsbfkDg.js} +1 -1
- package/dist/{vendor/benchmark.B6pblCp2.js → chunks/benchmark.DDmpNjj-.js} +1 -1
- package/dist/chunks/benchmark.puBFxyfE.d.ts +22 -0
- package/dist/{vendor/cac.DFtWvZc2.js → chunks/cac.DGgmCKmU.js} +17 -20
- package/dist/{vendor/cli-api.CTkP2Ier.js → chunks/cli-api.OKfd3qJ0.js} +416 -423
- package/dist/chunks/config.DCnyCTbs.d.ts +203 -0
- package/dist/chunks/{runtime-console.C2L2zykk.js → console.Bgn7_A1x.js} +11 -14
- package/dist/{vendor/constants.CsnA4eRy.js → chunks/constants.CaAN7icJ.js} +1 -3
- package/dist/{vendor/coverage.BhYSDdTT.js → chunks/coverage.CqfT4xaf.js} +4 -7
- package/dist/chunks/{browser-creator.CyaOd8pl.js → creator.a3OfuIEW.js} +8 -8
- package/dist/{vendor/env.2ltrQNq0.js → chunks/env.BU041cs9.js} +2 -3
- package/dist/chunks/environment.0M5R1SX_.d.ts +173 -0
- package/dist/{vendor/execute.jzOWtys_.js → chunks/execute.Cjlr2CRw.js} +27 -19
- package/dist/chunks/globals.BliuJFNR.js +31 -0
- package/dist/{vendor/index.DI9daj1Q.js → chunks/index.BfeNhc0N.js} +43 -43
- package/dist/{vendor/index.D6GZqexG.js → chunks/index.CM5UI-4O.js} +2 -2
- package/dist/{vendor/index.BJmtb_7W.js → chunks/index.DYufA6CZ.js} +2 -2
- package/dist/{vendor/index.CuuL9y4g.js → chunks/index.JbiJutJ_.js} +515 -255
- package/dist/{vendor/index.CVqMv71L.js → chunks/index.R1VjssW9.js} +11 -12
- package/dist/{vendor/index.D4nqnQWz.js → chunks/index.lVXYBqEP.js} +1 -18
- package/dist/{vendor/inspector.-FCQUzqR.js → chunks/inspector.70d6emsh.js} +4 -5
- package/dist/chunks/{environments-node.XE5FbRPQ.js → node.DS3zEPa7.js} +2 -2
- package/dist/{reporters-B7ebVMkT.d.ts → chunks/reporters.C_zwCd4j.d.ts} +847 -1000
- package/dist/{vendor/rpc.BGx7q_k2.js → chunks/rpc.B7Mfb-Yf.js} +3 -5
- package/dist/{vendor/run-once.Db8Hgq9X.js → chunks/run-once.Sxe67Wng.js} +1 -1
- package/dist/chunks/{runtime-runBaseTests.Dq_sJZq9.js → runBaseTests.CyvqmuC9.js} +21 -23
- package/dist/{vendor/setup-common.symvFZPh.js → chunks/setup-common.CNzatKMx.js} +2 -2
- package/dist/{suite-CRLAhsm0.d.ts → chunks/suite.CcK46U-P.d.ts} +1 -1
- package/dist/{vendor/tasks.DhVtQBtW.js → chunks/tasks.BZnCS9aT.js} +2 -3
- package/dist/{vendor/utils.DkxLWvS1.js → chunks/utils.C3_cBsyn.js} +3 -4
- package/dist/{vendor/global.7bFbnyXl.js → chunks/utils.Ck2hJTRs.js} +1 -1
- package/dist/{vendor/utils.BySfPUwy.js → chunks/utils.DpP_sDwr.js} +8 -21
- package/dist/{vendor/vi.Elqer9-7.js → chunks/vi.fiQ7lMRF.js} +13 -18
- package/dist/{vendor/vm.img-AOox.js → chunks/vm.DcSuuaHr.js} +40 -68
- package/dist/chunks/worker.C5iHKIaJ.d.ts +144 -0
- package/dist/chunks/worker.DKkAC4Qw.d.ts +8 -0
- package/dist/cli.js +3 -3
- package/dist/config.cjs +6 -8
- package/dist/config.d.ts +10 -8
- package/dist/config.js +6 -8
- package/dist/coverage.d.ts +10 -8
- package/dist/coverage.js +2 -2
- package/dist/environments.d.ts +3 -19
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +5 -14
- package/dist/execute.js +2 -2
- package/dist/index.d.ts +267 -34
- package/dist/index.js +12 -12
- package/dist/node.d.ts +15 -9
- package/dist/node.js +16 -19
- package/dist/reporters.d.ts +10 -8
- package/dist/reporters.js +12 -15
- package/dist/runners.d.ts +7 -19
- package/dist/runners.js +12 -13
- package/dist/snapshot.js +3 -3
- package/dist/suite.d.ts +2 -16
- package/dist/suite.js +4 -4
- package/dist/worker.js +7 -8
- package/dist/workers/forks.js +5 -5
- package/dist/workers/runVmTests.js +18 -19
- package/dist/workers/threads.js +5 -5
- package/dist/workers/vmForks.js +8 -8
- package/dist/workers/vmThreads.js +8 -8
- package/dist/workers.d.ts +13 -8
- package/dist/workers.js +13 -13
- package/package.json +13 -13
- package/dist/chunks/integrations-globals.nDMtdOcn.js +0 -31
- /package/dist/{vendor → chunks}/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/{vendor → chunks}/date.W2xKR2qe.js +0 -0
- /package/dist/chunks/{node-git.ZtkbKc8u.js → git.ZtkbKc8u.js} +0 -0
- /package/dist/{vendor → chunks}/index.BMmMjLIQ.js +0 -0
- /package/dist/{vendor → chunks}/index.BpSiYbpB.js +0 -0
- /package/dist/chunks/{install-pkg.DNUmWFkO.js → index.DNUmWFkO.js} +0 -0
- /package/dist/{vendor → chunks}/spy.Cf_4R5Oe.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { V as VitestEnvironment$1, S as SerializedSpec, b as RawErrsMap$1, T as TscErrorInfo$1, c as CollectLineNumbers$1, d as CollectLines$1, e as RootAndTarget$1, f as Context$1, C as CoverageProvider$1, g as ReportContext$1, a as CoverageProviderModule$1, h as CoverageReporter$1, i as CoverageProviderName, j as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, k as CoverageIstanbulOptions$1, l as CoverageV8Options$1, m as CustomProviderOptions$1, n as Reporter$1, o as Vitest$1, p as BrowserScript$1, q as BrowserConfigOptions$1, r as BuiltinEnvironment$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, U as UserConfig$1, x as ResolvedConfig$1, y as ProjectConfig$1, z as UserWorkspaceConfig$1, E as BenchmarkUserOptions$1 } from './chunks/reporters.C_zwCd4j.js';
|
|
2
|
+
import { Plugin } from '@vitest/pretty-format';
|
|
3
|
+
import { SnapshotState } from '@vitest/snapshot';
|
|
4
|
+
export { SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotSerializer, SnapshotStateOptions, SnapshotSummary, SnapshotUpdateState, UncheckedSnapshot } from '@vitest/snapshot';
|
|
5
|
+
import { PromisifyAssertion, Tester, ExpectStatic } from '@vitest/expect';
|
|
5
6
|
export { Assertion, AsymmetricMatchersContaining, ExpectPollOptions, ExpectStatic, JestAssertion } from '@vitest/expect';
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
7
|
+
import { B as BenchmarkResult } from './chunks/benchmark.puBFxyfE.js';
|
|
8
|
+
export { b as BenchFunction, a as Benchmark, c as BenchmarkAPI } from './chunks/benchmark.puBFxyfE.js';
|
|
9
|
+
import { U as UserConsoleLog, P as ProvidedContext, M as ModuleGraphData, b as Awaitable$1, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, O as OnServerRestartHandler$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.0M5R1SX_.js';
|
|
10
|
+
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.0M5R1SX_.js';
|
|
11
|
+
import { TaskPopulated, TaskResultPack, File as File$1, Suite as Suite$1, Test as Test$1, Custom as Custom$1, Task as Task$1, SequenceHooks as SequenceHooks$1, SequenceSetupFiles as SequenceSetupFiles$1 } from '@vitest/runner';
|
|
12
|
+
export { CancelReason, DoneCallback, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, RuntimeContext, SuiteAPI, SuiteCollector, SuiteFactory, SuiteHooks, TaskBase, TaskContext, TaskCustomOptions, TaskMeta, TaskResult, TaskResultPack, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
13
|
+
export { b as bench } from './chunks/suite.CcK46U-P.js';
|
|
14
|
+
import { F as FakeTimerInstallOpts, R as RuntimeOptions, S as SerializedConfig } from './chunks/config.DCnyCTbs.js';
|
|
15
|
+
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.DCnyCTbs.js';
|
|
16
|
+
import { M as MockFactoryWithHelper, a as BirpcReturn } from './chunks/worker.C5iHKIaJ.js';
|
|
17
|
+
export { C as ContextRPC, e as ContextTestEnvironment, c as ResolveIdFunction, b as RunnerRPC, R as RuntimeRPC, W as WorkerGlobalState, d as WorkerRPC } from './chunks/worker.C5iHKIaJ.js';
|
|
8
18
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
9
19
|
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject } from '@vitest/spy';
|
|
10
|
-
export {
|
|
20
|
+
export { W as WorkerContext } from './chunks/worker.DKkAC4Qw.js';
|
|
21
|
+
export { ErrorWithDiff, ParsedStack, SerializedError, TestError } from '@vitest/utils';
|
|
11
22
|
export { DiffOptions } from '@vitest/utils/diff';
|
|
12
|
-
import { TransformResult } from 'vite';
|
|
13
23
|
import * as chai from 'chai';
|
|
14
24
|
export { chai };
|
|
15
25
|
export { assert, should } from 'chai';
|
|
16
|
-
export { ErrorWithDiff, ParsedStack } from '@vitest/utils';
|
|
17
26
|
export { Bench as BenchFactory, Options as BenchOptions, Task as BenchTask, TaskResult as BenchTaskResult } from 'tinybench';
|
|
18
|
-
import '
|
|
19
|
-
import '@vitest/pretty-format';
|
|
27
|
+
import 'vite';
|
|
20
28
|
import 'vite-node';
|
|
21
29
|
import 'node:stream';
|
|
22
30
|
import 'vite-node/client';
|
|
23
31
|
import '@vitest/snapshot/manager';
|
|
24
32
|
import 'vite-node/server';
|
|
25
|
-
import 'node:worker_threads';
|
|
26
33
|
import '@vitest/utils/source-map';
|
|
27
34
|
import 'node:fs';
|
|
35
|
+
import '@vitest/runner/utils';
|
|
36
|
+
import '@vitest/snapshot/environment';
|
|
37
|
+
import 'node:worker_threads';
|
|
38
|
+
|
|
39
|
+
declare global {
|
|
40
|
+
namespace Chai {
|
|
41
|
+
interface Assertion {
|
|
42
|
+
containSubset: (expected: any) => Assertion;
|
|
43
|
+
}
|
|
44
|
+
interface Assert {
|
|
45
|
+
containSubset: (val: any, exp: any, msg?: string) => void;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
interface SnapshotMatcher<T> {
|
|
50
|
+
<U extends {
|
|
51
|
+
[P in keyof T]: any;
|
|
52
|
+
}>(snapshot: Partial<U>, message?: string): void;
|
|
53
|
+
(message?: string): void;
|
|
54
|
+
}
|
|
55
|
+
interface InlineSnapshotMatcher<T> {
|
|
56
|
+
<U extends {
|
|
57
|
+
[P in keyof T]: any;
|
|
58
|
+
}>(properties: Partial<U>, snapshot?: string, message?: string): void;
|
|
59
|
+
(message?: string): void;
|
|
60
|
+
}
|
|
61
|
+
declare module '@vitest/expect' {
|
|
62
|
+
interface MatcherState {
|
|
63
|
+
environment: VitestEnvironment$1;
|
|
64
|
+
snapshotState: SnapshotState;
|
|
65
|
+
}
|
|
66
|
+
interface ExpectPollOptions {
|
|
67
|
+
interval?: number;
|
|
68
|
+
timeout?: number;
|
|
69
|
+
message?: string;
|
|
70
|
+
}
|
|
71
|
+
interface ExpectStatic {
|
|
72
|
+
unreachable: (message?: string) => never;
|
|
73
|
+
soft: <T>(actual: T, message?: string) => Assertion<T>;
|
|
74
|
+
poll: <T>(actual: () => T, options?: ExpectPollOptions) => PromisifyAssertion<Awaited<T>>;
|
|
75
|
+
addEqualityTesters: (testers: Array<Tester>) => void;
|
|
76
|
+
assertions: (expected: number) => void;
|
|
77
|
+
hasAssertions: () => void;
|
|
78
|
+
addSnapshotSerializer: (plugin: Plugin) => void;
|
|
79
|
+
}
|
|
80
|
+
interface Assertion<T> {
|
|
81
|
+
matchSnapshot: SnapshotMatcher<T>;
|
|
82
|
+
toMatchSnapshot: SnapshotMatcher<T>;
|
|
83
|
+
toMatchInlineSnapshot: InlineSnapshotMatcher<T>;
|
|
84
|
+
toThrowErrorMatchingSnapshot: (message?: string) => void;
|
|
85
|
+
toThrowErrorMatchingInlineSnapshot: (snapshot?: string, message?: string) => void;
|
|
86
|
+
toMatchFileSnapshot: (filepath: string, message?: string) => Promise<void>;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
declare module '@vitest/runner' {
|
|
90
|
+
interface TestContext {
|
|
91
|
+
expect: ExpectStatic;
|
|
92
|
+
}
|
|
93
|
+
interface TaskMeta {
|
|
94
|
+
typecheck?: boolean;
|
|
95
|
+
benchmark?: boolean;
|
|
96
|
+
failScreenshotPath?: string;
|
|
97
|
+
}
|
|
98
|
+
interface File {
|
|
99
|
+
prepareDuration?: number;
|
|
100
|
+
environmentLoad?: number;
|
|
101
|
+
}
|
|
102
|
+
interface TaskBase {
|
|
103
|
+
logs?: UserConsoleLog[];
|
|
104
|
+
}
|
|
105
|
+
interface TaskResult {
|
|
106
|
+
benchmark?: BenchmarkResult;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
28
109
|
|
|
29
110
|
/**
|
|
30
111
|
* Negates a boolean type.
|
|
@@ -1056,11 +1137,6 @@ interface AssertType {
|
|
|
1056
1137
|
}
|
|
1057
1138
|
declare const assertType: AssertType;
|
|
1058
1139
|
|
|
1059
|
-
interface BrowserUI {
|
|
1060
|
-
setCurrentFileId: (fileId: string) => void;
|
|
1061
|
-
setIframeViewport: (width: number, height: number) => Promise<void>;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
1140
|
/**
|
|
1065
1141
|
* This utils allows computational intensive tasks to only be ran once
|
|
1066
1142
|
* across test reruns to improve the watch mode performance.
|
|
@@ -1180,8 +1256,8 @@ interface VitestUtils {
|
|
|
1180
1256
|
clearAllTimers: () => VitestUtils;
|
|
1181
1257
|
/**
|
|
1182
1258
|
* Creates a spy on a method or getter/setter of an object similar to [`vi.fn()`](https://vitest.dev/api/vi#vi-fn). It returns a [mock function](https://vitest.dev/api/mock).
|
|
1183
|
-
*
|
|
1184
1259
|
* @example
|
|
1260
|
+
* ```ts
|
|
1185
1261
|
* const cart = {
|
|
1186
1262
|
* getApples: () => 42
|
|
1187
1263
|
* }
|
|
@@ -1191,14 +1267,15 @@ interface VitestUtils {
|
|
|
1191
1267
|
* expect(cart.getApples()).toBe(10)
|
|
1192
1268
|
* expect(spy).toHaveBeenCalled()
|
|
1193
1269
|
* expect(spy).toHaveReturnedWith(10)
|
|
1270
|
+
* ```
|
|
1194
1271
|
*/
|
|
1195
1272
|
spyOn: typeof spyOn;
|
|
1196
1273
|
/**
|
|
1197
1274
|
* Creates a spy on a function, though can be initiated without one. Every time a function is invoked, it stores its call arguments, returns, and instances. Also, you can manipulate its behavior with [methods](https://vitest.dev/api/mock).
|
|
1198
1275
|
*
|
|
1199
1276
|
* If no function is given, mock will return `undefined`, when invoked.
|
|
1200
|
-
*
|
|
1201
1277
|
* @example
|
|
1278
|
+
* ```ts
|
|
1202
1279
|
* const getApples = vi.fn(() => 0)
|
|
1203
1280
|
*
|
|
1204
1281
|
* getApples()
|
|
@@ -1210,14 +1287,15 @@ interface VitestUtils {
|
|
|
1210
1287
|
*
|
|
1211
1288
|
* expect(getApples()).toBe(5)
|
|
1212
1289
|
* expect(getApples).toHaveNthReturnedWith(2, 5)
|
|
1290
|
+
* ```
|
|
1213
1291
|
*/
|
|
1214
1292
|
fn: typeof fn;
|
|
1215
1293
|
/**
|
|
1216
1294
|
* Wait for the callback to execute successfully. If the callback throws an error or returns a rejected promise it will continue to wait until it succeeds or times out.
|
|
1217
1295
|
*
|
|
1218
1296
|
* This is very useful when you need to wait for some asynchronous action to complete, for example, when you start a server and need to wait for it to start.
|
|
1219
|
-
*
|
|
1220
1297
|
* @example
|
|
1298
|
+
* ```ts
|
|
1221
1299
|
* const server = createServer()
|
|
1222
1300
|
*
|
|
1223
1301
|
* await vi.waitFor(
|
|
@@ -1231,14 +1309,15 @@ interface VitestUtils {
|
|
|
1231
1309
|
* interval: 20, // default is 50
|
|
1232
1310
|
* }
|
|
1233
1311
|
* )
|
|
1312
|
+
* ```
|
|
1234
1313
|
*/
|
|
1235
1314
|
waitFor: typeof waitFor;
|
|
1236
1315
|
/**
|
|
1237
1316
|
* This is similar to [`vi.waitFor`](https://vitest.dev/api/vi#vi-waitfor), but if the callback throws any errors, execution is immediately interrupted and an error message is received.
|
|
1238
1317
|
*
|
|
1239
1318
|
* If the callback returns a falsy value, the next check will continue until a truthy value is returned. This is useful when you need to wait for something to exist before taking the next step.
|
|
1240
|
-
*
|
|
1241
1319
|
* @example
|
|
1320
|
+
* ```ts
|
|
1242
1321
|
* const element = await vi.waitUntil(
|
|
1243
1322
|
* () => document.querySelector('.element'),
|
|
1244
1323
|
* {
|
|
@@ -1249,6 +1328,7 @@ interface VitestUtils {
|
|
|
1249
1328
|
*
|
|
1250
1329
|
* // do something with the element
|
|
1251
1330
|
* expect(element.querySelector('.element-child')).toBeTruthy()
|
|
1331
|
+
* ```
|
|
1252
1332
|
*/
|
|
1253
1333
|
waitUntil: typeof waitUntil;
|
|
1254
1334
|
/**
|
|
@@ -1301,11 +1381,13 @@ interface VitestUtils {
|
|
|
1301
1381
|
* Imports module, bypassing all checks if it should be mocked.
|
|
1302
1382
|
* Can be useful if you want to mock module partially.
|
|
1303
1383
|
* @example
|
|
1384
|
+
* ```ts
|
|
1304
1385
|
* vi.mock('./example.js', async () => {
|
|
1305
1386
|
* const axios = await vi.importActual<typeof import('./example.js')>('./example.js')
|
|
1306
1387
|
*
|
|
1307
1388
|
* return { ...axios, get: vi.fn() }
|
|
1308
1389
|
* })
|
|
1390
|
+
* ```
|
|
1309
1391
|
* @param path Path to the module. Can be aliased, if your config supports it
|
|
1310
1392
|
*/
|
|
1311
1393
|
importActual: <T = ESModuleExports>(path: string) => Promise<T>;
|
|
@@ -1314,9 +1396,11 @@ interface VitestUtils {
|
|
|
1314
1396
|
*
|
|
1315
1397
|
* Mocking algorithm is described in [documentation](https://vitest.dev/guide/mocking#modules).
|
|
1316
1398
|
* @example
|
|
1399
|
+
* ```ts
|
|
1317
1400
|
* const example = await vi.importMock<typeof import('./example.js')>('./example.js')
|
|
1318
1401
|
* example.calc.mockReturnValue(10)
|
|
1319
1402
|
* expect(example.calc()).toBe(10)
|
|
1403
|
+
* ```
|
|
1320
1404
|
* @param path Path to the module. Can be aliased, if your config supports it
|
|
1321
1405
|
* @returns Fully mocked module
|
|
1322
1406
|
*/
|
|
@@ -1327,6 +1411,7 @@ interface VitestUtils {
|
|
|
1327
1411
|
* When `partial` is `true` it will expect a `Partial<T>` as a return value. By default, this will only make TypeScript believe that
|
|
1328
1412
|
* the first level values are mocked. You can pass down `{ deep: true }` as a second argument to tell TypeScript that the whole object is mocked, if it actually is.
|
|
1329
1413
|
* @example
|
|
1414
|
+
* ```ts
|
|
1330
1415
|
* import example from './example.js'
|
|
1331
1416
|
* vi.mock('./example.js')
|
|
1332
1417
|
*
|
|
@@ -1334,6 +1419,7 @@ interface VitestUtils {
|
|
|
1334
1419
|
* vi.mocked(example.calc).mockReturnValue(10)
|
|
1335
1420
|
* expect(example.calc(1, '+', 1)).toBe(10)
|
|
1336
1421
|
* })
|
|
1422
|
+
* ```
|
|
1337
1423
|
* @param item Anything that can be mocked
|
|
1338
1424
|
* @param deep If the object is deeply mocked
|
|
1339
1425
|
* @param options If the object is partially or deeply mocked
|
|
@@ -1406,7 +1492,7 @@ interface VitestUtils {
|
|
|
1406
1492
|
/**
|
|
1407
1493
|
* Updates runtime config. You can only change values that are used when executing tests.
|
|
1408
1494
|
*/
|
|
1409
|
-
setConfig: (config:
|
|
1495
|
+
setConfig: (config: RuntimeOptions) => void;
|
|
1410
1496
|
/**
|
|
1411
1497
|
* If config was changed with `vi.setConfig`, this will reset it to the original state.
|
|
1412
1498
|
*/
|
|
@@ -1415,7 +1501,7 @@ interface VitestUtils {
|
|
|
1415
1501
|
declare const vitest: VitestUtils;
|
|
1416
1502
|
declare const vi: VitestUtils;
|
|
1417
1503
|
|
|
1418
|
-
declare function getRunningMode(): "
|
|
1504
|
+
declare function getRunningMode(): "watch" | "run";
|
|
1419
1505
|
declare function isWatchMode(): boolean;
|
|
1420
1506
|
|
|
1421
1507
|
/**
|
|
@@ -1424,30 +1510,177 @@ declare function isWatchMode(): boolean;
|
|
|
1424
1510
|
*/
|
|
1425
1511
|
declare function inject<T extends keyof ProvidedContext & string>(key: T): ProvidedContext[T];
|
|
1426
1512
|
|
|
1427
|
-
interface
|
|
1513
|
+
interface BrowserUI {
|
|
1514
|
+
setCurrentFileId: (fileId: string) => void;
|
|
1515
|
+
setIframeViewport: (width: number, height: number) => Promise<void>;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
interface SourceMap {
|
|
1519
|
+
file: string;
|
|
1520
|
+
mappings: string;
|
|
1521
|
+
names: string[];
|
|
1522
|
+
sources: string[];
|
|
1523
|
+
sourcesContent?: string[];
|
|
1524
|
+
version: number;
|
|
1525
|
+
toString: () => string;
|
|
1526
|
+
toUrl: () => string;
|
|
1527
|
+
}
|
|
1528
|
+
interface TransformResultWithSource {
|
|
1529
|
+
code: string;
|
|
1530
|
+
map: SourceMap | {
|
|
1531
|
+
mappings: '';
|
|
1532
|
+
} | null;
|
|
1533
|
+
etag?: string;
|
|
1534
|
+
deps?: string[];
|
|
1535
|
+
dynamicDeps?: string[];
|
|
1428
1536
|
source?: string;
|
|
1429
1537
|
}
|
|
1430
1538
|
interface WebSocketHandlers {
|
|
1431
|
-
onCollected: (files?: File[]) => Promise<void>;
|
|
1432
1539
|
onTaskUpdate: (packs: TaskResultPack[]) => void;
|
|
1433
|
-
getFiles: () => File[];
|
|
1434
|
-
getTestFiles: () => Promise<[
|
|
1435
|
-
name: string;
|
|
1436
|
-
root: string;
|
|
1437
|
-
}, file: string][]>;
|
|
1540
|
+
getFiles: () => File$1[];
|
|
1541
|
+
getTestFiles: () => Promise<SerializedSpec[]>;
|
|
1438
1542
|
getPaths: () => string[];
|
|
1439
|
-
getConfig: () =>
|
|
1543
|
+
getConfig: () => SerializedConfig;
|
|
1440
1544
|
getModuleGraph: (projectName: string, id: string, browser?: boolean) => Promise<ModuleGraphData>;
|
|
1441
1545
|
getTransformResult: (projectName: string, id: string, browser?: boolean) => Promise<TransformResultWithSource | undefined>;
|
|
1442
1546
|
readTestFile: (id: string) => Promise<string | null>;
|
|
1443
1547
|
saveTestFile: (id: string, content: string) => Promise<void>;
|
|
1444
1548
|
rerun: (files: string[]) => Promise<void>;
|
|
1445
|
-
updateSnapshot: (file?: File) => Promise<void>;
|
|
1549
|
+
updateSnapshot: (file?: File$1) => Promise<void>;
|
|
1446
1550
|
getUnhandledErrors: () => unknown[];
|
|
1447
1551
|
}
|
|
1448
|
-
interface WebSocketEvents
|
|
1552
|
+
interface WebSocketEvents {
|
|
1553
|
+
onCollected?: (files?: File$1[]) => Awaitable$1<void>;
|
|
1554
|
+
onFinished?: (files: File$1[], errors: unknown[], coverage?: unknown) => Awaitable$1<void>;
|
|
1555
|
+
onTaskUpdate?: (packs: TaskResultPack[]) => Awaitable$1<void>;
|
|
1556
|
+
onUserConsoleLog?: (log: UserConsoleLog) => Awaitable$1<void>;
|
|
1557
|
+
onPathsCollected?: (paths?: string[]) => Awaitable$1<void>;
|
|
1558
|
+
onSpecsCollected?: (specs?: SerializedSpec[]) => Awaitable$1<void>;
|
|
1449
1559
|
onFinishedReportCoverage: () => void;
|
|
1450
1560
|
}
|
|
1451
1561
|
type WebSocketRPC = BirpcReturn<WebSocketEvents, WebSocketHandlers>;
|
|
1452
1562
|
|
|
1453
|
-
|
|
1563
|
+
/** @deprecated import `TypeCheckRawErrorsMap` from `vitest/node` instead */
|
|
1564
|
+
type RawErrsMap = RawErrsMap$1;
|
|
1565
|
+
/** @deprecated import `TypeCheckErrorInfo` from `vitest/node` instead */
|
|
1566
|
+
type TscErrorInfo = TscErrorInfo$1;
|
|
1567
|
+
/** @deprecated import `TypeCheckCollectLineNumbers` from `vitest/node` instead */
|
|
1568
|
+
type CollectLineNumbers = CollectLineNumbers$1;
|
|
1569
|
+
/** @deprecated import `TypeCheckCollectLines` from `vitest/node` instead */
|
|
1570
|
+
type CollectLines = CollectLines$1;
|
|
1571
|
+
/** @deprecated import `TypeCheckRootAndTarget` from `vitest/node` instead */
|
|
1572
|
+
type RootAndTarget = RootAndTarget$1;
|
|
1573
|
+
/** @deprecated import `TypeCheckContext` from `vitest/node` instead */
|
|
1574
|
+
type Context = Context$1;
|
|
1575
|
+
/** @deprecated use `RunnerTestSuite` instead */
|
|
1576
|
+
type Suite = Suite$1;
|
|
1577
|
+
/** @deprecated use `RunnerTestFile` instead */
|
|
1578
|
+
type File = File$1;
|
|
1579
|
+
/** @deprecated use `RunnerTestCase` instead */
|
|
1580
|
+
type Test = Test$1;
|
|
1581
|
+
/** @deprecated use `RunnerCustomCase` instead */
|
|
1582
|
+
type Custom = Custom$1;
|
|
1583
|
+
/** @deprecated use `RunnerTask` instead */
|
|
1584
|
+
type Task = Task$1;
|
|
1585
|
+
|
|
1586
|
+
/** @deprecated do not use, internal helper */
|
|
1587
|
+
type Awaitable<T> = Awaitable$1<T>;
|
|
1588
|
+
/** @deprecated do not use, internal helper */
|
|
1589
|
+
type Nullable<T> = Nullable$1<T>;
|
|
1590
|
+
/** @deprecated do not use, internal helper */
|
|
1591
|
+
type Arrayable<T> = Arrayable$1<T>;
|
|
1592
|
+
/** @deprecated do not use, internal helper */
|
|
1593
|
+
type ArgumentsType<T> = ArgumentsType$1<T>;
|
|
1594
|
+
/** @deprecated do not use, internal helper */
|
|
1595
|
+
type MutableArray<T extends readonly any[]> = MutableArray$1<T>;
|
|
1596
|
+
/** @deprecated do not use, internal helper */
|
|
1597
|
+
type Constructable = Constructable$1;
|
|
1598
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1599
|
+
type OnServerRestartHandler = OnServerRestartHandler$1;
|
|
1600
|
+
|
|
1601
|
+
/** @deprecated import from `vitest/environments` instead */
|
|
1602
|
+
type EnvironmentReturn = EnvironmentReturn$1;
|
|
1603
|
+
/** @deprecated import from `vitest/environments` instead */
|
|
1604
|
+
type VmEnvironmentReturn = VmEnvironmentReturn$1;
|
|
1605
|
+
/** @deprecated import from `vitest/environments` instead */
|
|
1606
|
+
type Environment = Environment$1;
|
|
1607
|
+
/** @deprecated do not use it */
|
|
1608
|
+
type ResolvedTestEnvironment = ResolvedTestEnvironment$1;
|
|
1609
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1610
|
+
type CoverageProvider = CoverageProvider$1;
|
|
1611
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1612
|
+
type ReportContext = ReportContext$1;
|
|
1613
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1614
|
+
type CoverageProviderModule = CoverageProviderModule$1;
|
|
1615
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1616
|
+
type CoverageReporter = CoverageReporter$1;
|
|
1617
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1618
|
+
type CoverageOptions<T extends CoverageProviderName = CoverageProviderName> = CoverageOptions$1<T>;
|
|
1619
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1620
|
+
type ResolvedCoverageOptions<T extends CoverageProviderName = CoverageProviderName> = ResolvedCoverageOptions$1<T>;
|
|
1621
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1622
|
+
type BaseCoverageOptions = BaseCoverageOptions$1;
|
|
1623
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1624
|
+
type CoverageIstanbulOptions = CoverageIstanbulOptions$1;
|
|
1625
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1626
|
+
type CoverageV8Options = CoverageV8Options$1;
|
|
1627
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1628
|
+
type CustomProviderOptions = CustomProviderOptions$1;
|
|
1629
|
+
|
|
1630
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1631
|
+
type Reporter = Reporter$1;
|
|
1632
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1633
|
+
type Vitest = Vitest$1;
|
|
1634
|
+
|
|
1635
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1636
|
+
type BrowserScript = BrowserScript$1;
|
|
1637
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1638
|
+
type BrowserConfigOptions = BrowserConfigOptions$1;
|
|
1639
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1640
|
+
type SequenceHooks = SequenceHooks$1;
|
|
1641
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1642
|
+
type SequenceSetupFiles = SequenceSetupFiles$1;
|
|
1643
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1644
|
+
type BuiltinEnvironment = BuiltinEnvironment$1;
|
|
1645
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1646
|
+
type VitestEnvironment = VitestEnvironment$1;
|
|
1647
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1648
|
+
type Pool = Pool$1;
|
|
1649
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1650
|
+
type PoolOptions = PoolOptions$1;
|
|
1651
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1652
|
+
type CSSModuleScopeStrategy = CSSModuleScopeStrategy$1;
|
|
1653
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1654
|
+
type ApiConfig = ApiConfig$1;
|
|
1655
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1656
|
+
type JSDOMOptions = JSDOMOptions$1;
|
|
1657
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1658
|
+
type HappyDOMOptions = HappyDOMOptions$1;
|
|
1659
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1660
|
+
type EnvironmentOptions = EnvironmentOptions$1;
|
|
1661
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1662
|
+
type VitestRunMode = VitestRunMode$1;
|
|
1663
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1664
|
+
type DepsOptimizationOptions = DepsOptimizationOptions$1;
|
|
1665
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1666
|
+
type TransformModePatterns = TransformModePatterns$1;
|
|
1667
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1668
|
+
type InlineConfig = InlineConfig$1;
|
|
1669
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1670
|
+
type TypecheckConfig = TypecheckConfig$1;
|
|
1671
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1672
|
+
type UserConfig = UserConfig$1;
|
|
1673
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1674
|
+
type ResolvedConfig = ResolvedConfig$1;
|
|
1675
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1676
|
+
type ProjectConfig = ProjectConfig$1;
|
|
1677
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1678
|
+
type UserWorkspaceConfig = UserWorkspaceConfig$1;
|
|
1679
|
+
|
|
1680
|
+
/** @deprecated use `SerializedSpec` instead */
|
|
1681
|
+
type SerializableSpec = SerializedSpec;
|
|
1682
|
+
|
|
1683
|
+
/** @deprecated import from `vitest/node` instead */
|
|
1684
|
+
type BenchmarkUserOptions = BenchmarkUserOptions$1;
|
|
1685
|
+
|
|
1686
|
+
export { type ApiConfig, type ArgumentsType, type Arrayable, type AssertType, type Awaitable, type BaseCoverageOptions, BenchmarkResult, type BenchmarkUserOptions, type BrowserConfigOptions, type BrowserScript, type BrowserUI, type BuiltinEnvironment, type CSSModuleScopeStrategy, type CollectLineNumbers, type CollectLines, type Constructable, type Context, type CoverageIstanbulOptions, type CoverageOptions, type CoverageProvider, type CoverageProviderModule, type CoverageReporter, type CoverageV8Options, type Custom, type CustomProviderOptions, type DepsOptimizationOptions, type Environment, type EnvironmentOptions, type EnvironmentReturn, type ExpectTypeOf, type File, type HappyDOMOptions, type InlineConfig, type JSDOMOptions, ModuleGraphData, type MutableArray, type Nullable, type OnServerRestartHandler, type Pool, type PoolOptions, type ProjectConfig, ProvidedContext, type RawErrsMap, type ReportContext, type Reporter, type ResolvedConfig, type ResolvedCoverageOptions, type ResolvedTestEnvironment, type RootAndTarget, type SequenceHooks, type SequenceSetupFiles, type SerializableSpec, SerializedConfig, SerializedSpec, type Suite, type Task, type Test, type TransformModePatterns, type TransformResultWithSource, type TscErrorInfo, type TypecheckConfig, type UserConfig, UserConsoleLog, type UserWorkspaceConfig, type Vitest, type VitestEnvironment, type VitestRunMode, type VitestUtils, type VmEnvironmentReturn, type WebSocketEvents, type WebSocketHandlers, type WebSocketRPC, assertType, createExpect, globalExpect as expect, expectTypeOf, getRunningMode, inject, isFirstRun, isWatchMode, runOnce, vi, vitest };
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
2
|
-
export { b as bench } from './
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
2
|
+
export { b as bench } from './chunks/benchmark.DDmpNjj-.js';
|
|
3
|
+
import { d as dist } from './chunks/index.BfeNhc0N.js';
|
|
4
|
+
export { a as assertType, g as getRunningMode, b as inject, i as isWatchMode } from './chunks/index.BfeNhc0N.js';
|
|
5
|
+
export { i as isFirstRun, a as runOnce } from './chunks/run-once.Sxe67Wng.js';
|
|
6
|
+
export { c as createExpect, a as expect, v as vi, b as vitest } from './chunks/vi.fiQ7lMRF.js';
|
|
7
7
|
import * as chai from 'chai';
|
|
8
8
|
export { chai };
|
|
9
9
|
export { assert, should } from 'chai';
|
|
10
10
|
import '@vitest/runner/utils';
|
|
11
11
|
import '@vitest/utils';
|
|
12
|
-
import './
|
|
12
|
+
import './chunks/index.DYufA6CZ.js';
|
|
13
13
|
import 'pathe';
|
|
14
|
-
import './
|
|
15
|
-
import './
|
|
14
|
+
import './chunks/utils.Ck2hJTRs.js';
|
|
15
|
+
import './chunks/env.BU041cs9.js';
|
|
16
16
|
import 'std-env';
|
|
17
|
-
import './
|
|
17
|
+
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
18
18
|
import '@vitest/expect';
|
|
19
19
|
import '@vitest/snapshot';
|
|
20
20
|
import '@vitest/utils/error';
|
|
21
|
-
import './
|
|
21
|
+
import './chunks/tasks.BZnCS9aT.js';
|
|
22
22
|
import '@vitest/utils/source-map';
|
|
23
|
-
import './
|
|
24
|
-
import './
|
|
23
|
+
import './chunks/base.DSsbfkDg.js';
|
|
24
|
+
import './chunks/date.W2xKR2qe.js';
|
|
25
25
|
import '@vitest/spy';
|
|
26
26
|
|
|
27
27
|
|
package/dist/node.d.ts
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { u as VitestRunMode, U as UserConfig, F as VitestOptions, o as Vitest, x as ResolvedConfig, W as WorkspaceProject, A as ApiConfig, L as Logger, G as TestSequencer, H as WorkspaceSpec } from './chunks/reporters.C_zwCd4j.js';
|
|
2
|
+
export { B as BaseCoverageOptions, E as BenchmarkUserOptions, $ as BrowserBuiltinProvider, a0 as BrowserCommand, a1 as BrowserCommandContext, q as BrowserConfigOptions, a5 as BrowserOrchestrator, Q as BrowserProvider, O as BrowserProviderInitializationOptions, Y as BrowserProviderModule, _ as BrowserProviderOptions, p as BrowserScript, a2 as BrowserServer, a3 as BrowserServerState, a4 as BrowserServerStateContext, r as BuiltinEnvironment, X as CDPSession, t as CSSModuleScopeStrategy, k as CoverageIstanbulOptions, j as CoverageOptions, C as CoverageProvider, a as CoverageProviderModule, h as CoverageReporter, l as CoverageV8Options, m as CustomProviderOptions, D as DepsOptimizationOptions, ag as FileDiagnostic, a8 as HTMLOptions, I as InlineConfig, a7 as JUnitOptions, a6 as JsonOptions, P as Pool, s as PoolOptions, J as ProcessPool, y as ProjectConfig, g as ReportContext, Z as ResolvedBrowserOptions, R as ResolvedCoverageOptions, al as ResolvedProjectConfig, ae as TaskOptions, a9 as TestCase, ad as TestCollection, af as TestDiagnostic, aa as TestFile, ac as TestProject, ah as TestResult, aj as TestResultFailed, ai as TestResultPassed, ak as TestResultSkipped, N as TestSequencerConstructor, ab as TestSuite, v as TransformModePatterns, c as TypeCheckCollectLineNumbers, d as TypeCheckCollectLines, f as TypeCheckContext, T as TypeCheckErrorInfo, b as TypeCheckRawErrorsMap, e as TypeCheckRootAndTarget, w as TypecheckConfig, z as UserWorkspaceConfig, V as VitestEnvironment, M as VitestPackageInstaller, K as getFilePoolName } from './chunks/reporters.C_zwCd4j.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1 } from 'vite';
|
|
4
4
|
import * as vite from 'vite';
|
|
5
5
|
export { vite as Vite };
|
|
6
6
|
export { createServer, isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
7
7
|
import { Writable } from 'node:stream';
|
|
8
|
+
import { P as ProvidedContext } from './chunks/environment.0M5R1SX_.js';
|
|
9
|
+
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions, O as OnServerRestartHandler } from './chunks/environment.0M5R1SX_.js';
|
|
10
|
+
import { R as RuntimeRPC } from './chunks/worker.C5iHKIaJ.js';
|
|
8
11
|
import createDebug from 'debug';
|
|
12
|
+
export { W as WorkerContext } from './chunks/worker.DKkAC4Qw.js';
|
|
13
|
+
export { SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
14
|
+
export { b as RuntimeConfig } from './chunks/config.DCnyCTbs.js';
|
|
9
15
|
import '@vitest/pretty-format';
|
|
10
|
-
import '@vitest/runner';
|
|
11
16
|
import 'vite-node';
|
|
12
17
|
import '@vitest/snapshot';
|
|
13
|
-
import '@vitest/expect';
|
|
14
|
-
import '@vitest/runner/utils';
|
|
15
|
-
import '@vitest/utils';
|
|
16
|
-
import 'tinybench';
|
|
17
18
|
import 'vite-node/client';
|
|
18
19
|
import '@vitest/snapshot/manager';
|
|
19
20
|
import 'vite-node/server';
|
|
20
|
-
import '
|
|
21
|
+
import '@vitest/utils';
|
|
21
22
|
import '@vitest/utils/source-map';
|
|
22
23
|
import 'node:fs';
|
|
23
24
|
import 'chai';
|
|
25
|
+
import './chunks/benchmark.puBFxyfE.js';
|
|
26
|
+
import '@vitest/runner/utils';
|
|
27
|
+
import 'tinybench';
|
|
28
|
+
import 'node:worker_threads';
|
|
29
|
+
import '@vitest/snapshot/environment';
|
|
24
30
|
|
|
25
31
|
declare function createVitest(mode: VitestRunMode, options: UserConfig, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
26
32
|
|
|
@@ -93,4 +99,4 @@ declare class BaseSequencer implements TestSequencer {
|
|
|
93
99
|
sort(files: WorkspaceSpec[]): Promise<WorkspaceSpec[]>;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
|
-
export { BaseSequencer, GitNotFoundError, type GlobalSetupContext, TestSequencer, FilesNotFoundError as TestsNotFoundError, Vitest, VitestPlugin, WorkspaceProject, WorkspaceSpec, createDebugger, createMethodsRPC, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest };
|
|
102
|
+
export { ApiConfig, BaseSequencer, GitNotFoundError, type GlobalSetupContext, ResolvedConfig, TestSequencer, FilesNotFoundError as TestsNotFoundError, UserConfig, Vitest, VitestPlugin, VitestRunMode, WorkspaceProject, WorkspaceSpec, createDebugger, createMethodsRPC, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest };
|
package/dist/node.js
CHANGED
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, g as getFilePoolName, r as registerConsoleShortcuts, e as resolveApiServerConfig, f as resolveConfig, d as resolveFsAllow, s as startVitest } from './
|
|
2
|
-
export { p as parseCLI } from './
|
|
1
|
+
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, g as getFilePoolName, r as registerConsoleShortcuts, e as resolveApiServerConfig, f as resolveConfig, d as resolveFsAllow, s as startVitest } from './chunks/cli-api.OKfd3qJ0.js';
|
|
2
|
+
export { p as parseCLI } from './chunks/cac.DGgmCKmU.js';
|
|
3
3
|
import createDebug from 'debug';
|
|
4
4
|
export { distDir, rootDir } from './path.js';
|
|
5
|
-
export {
|
|
5
|
+
export { h as BaseSequencer, d as TestCase, e as TestFile, i as TestProject, f as TestSuite } from './chunks/index.JbiJutJ_.js';
|
|
6
6
|
export { createServer, isFileServingAllowed, parseAst, parseAstAsync } from 'vite';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'pathe';
|
|
9
|
-
import './
|
|
10
|
-
import './
|
|
11
|
-
import 'node:console';
|
|
12
|
-
import './vendor/index.D6GZqexG.js';
|
|
9
|
+
import './chunks/coverage.CqfT4xaf.js';
|
|
10
|
+
import './chunks/index.CM5UI-4O.js';
|
|
13
11
|
import 'node:path';
|
|
14
12
|
import 'node:url';
|
|
15
13
|
import 'node:process';
|
|
16
|
-
import './
|
|
14
|
+
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
17
15
|
import 'readline';
|
|
18
16
|
import 'events';
|
|
19
|
-
import './
|
|
17
|
+
import './chunks/constants.CaAN7icJ.js';
|
|
20
18
|
import 'node:worker_threads';
|
|
21
19
|
import 'os';
|
|
22
20
|
import 'path';
|
|
23
21
|
import 'util';
|
|
24
|
-
import './
|
|
22
|
+
import './chunks/index.BMmMjLIQ.js';
|
|
25
23
|
import 'stream';
|
|
26
24
|
import 'fs';
|
|
27
25
|
import 'vite-node/client';
|
|
28
26
|
import '@vitest/snapshot/manager';
|
|
29
27
|
import 'vite-node/server';
|
|
30
28
|
import '@vitest/runner/utils';
|
|
31
|
-
import './
|
|
29
|
+
import './chunks/base.DSsbfkDg.js';
|
|
32
30
|
import '@vitest/utils';
|
|
33
|
-
import './
|
|
31
|
+
import './chunks/env.BU041cs9.js';
|
|
34
32
|
import 'std-env';
|
|
35
|
-
import './
|
|
33
|
+
import './chunks/index.BpSiYbpB.js';
|
|
36
34
|
import 'zlib';
|
|
37
35
|
import 'buffer';
|
|
38
36
|
import 'crypto';
|
|
@@ -55,17 +53,16 @@ import 'tinyrainbow';
|
|
|
55
53
|
import 'vite-node/utils';
|
|
56
54
|
import 'magic-string';
|
|
57
55
|
import '@vitest/utils/ast';
|
|
58
|
-
import './
|
|
59
|
-
import './
|
|
56
|
+
import './chunks/index.DYufA6CZ.js';
|
|
57
|
+
import './chunks/utils.Ck2hJTRs.js';
|
|
60
58
|
import 'node:readline';
|
|
61
|
-
import './
|
|
62
|
-
import './
|
|
59
|
+
import './chunks/utils.DpP_sDwr.js';
|
|
60
|
+
import './chunks/tasks.BZnCS9aT.js';
|
|
63
61
|
import 'node:perf_hooks';
|
|
64
|
-
import './chunks/runtime-console.C2L2zykk.js';
|
|
65
62
|
import 'node:stream';
|
|
66
|
-
import './vendor/date.W2xKR2qe.js';
|
|
67
63
|
import 'execa';
|
|
68
64
|
import 'module';
|
|
65
|
+
import 'node:console';
|
|
69
66
|
import 'assert';
|
|
70
67
|
|
|
71
68
|
function createDebugger(namespace) {
|