vitest 1.1.3 → 1.2.1
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 +1 -1
- package/dist/browser.js +5 -31
- package/dist/chunks/{api-setup.mFKdEKxa.js → api-setup.omeaEsoT.js} +60 -6
- package/dist/chunks/{integrations-globals.tnKXwyh5.js → integrations-globals.9QpVy4UR.js} +9 -8
- package/dist/chunks/{runtime-console.hf2msWA9.js → runtime-console.Iloo9fIt.js} +2 -2
- package/dist/{entry.js → chunks/runtime-runBaseTests.S8ZSFig3.js} +20 -18
- package/dist/cli-wrapper.js +1 -1
- package/dist/cli.js +15 -15
- package/dist/config.cjs +12 -1
- package/dist/config.d.ts +1 -71
- package/dist/config.js +12 -2
- package/dist/coverage.d.ts +1 -1
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +8 -6
- package/dist/execute.js +4 -7
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -7
- package/dist/node.d.ts +3 -3
- package/dist/node.js +13 -13
- package/dist/{reporters-qc5Smpt5.d.ts → reporters-rzC174PQ.d.ts} +188 -29
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +5 -5
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +7 -5
- package/dist/{suite-WwpgKT7k.d.ts → suite-MFRDkZcV.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/suite.js +3 -3
- package/dist/vendor/base.4sEqnqgY.js +38 -0
- package/dist/vendor/{base._79unx2z.js → base.QYERqzkH.js} +10 -1
- package/dist/vendor/{benchmark.WVm6DARl.js → benchmark.IlKmJkUU.js} +1 -1
- package/dist/vendor/{constants.WSvnD_fn.js → constants.i1PoEnhr.js} +9 -1
- package/dist/vendor/{coverage.v6aD8iAh.js → coverage.E7sG1b3r.js} +1 -1
- package/dist/vendor/{environments.QJtma9XQ.js → environments.sU0TD7wX.js} +19 -7
- package/dist/vendor/execute.edwByI27.js +589 -0
- package/dist/vendor/{global.L7JRz1qU.js → global.CkGT_TMy.js} +10 -1
- package/dist/vendor/{index.h0j9y5vy.js → index.kwCLJK4i.js} +5 -5
- package/dist/vendor/{index.XU72Rmy8.js → index.rJjbcrrp.js} +1 -1
- package/dist/vendor/{index.IhksUGLR.js → index.vs_-lzuF.js} +6 -6
- package/dist/vendor/{node.wTZytysZ.js → node.p6h5JSuL.js} +694 -286
- package/dist/vendor/{reporters.7Y4WN6gc.js → reporters.cA9x-5v-.js} +8 -5
- package/dist/vendor/{rpc.Bl-ysZIr.js → rpc.w4v8oCkK.js} +23 -2
- package/dist/vendor/{run-once.X3E7xx3F.js → run-once.Olz_Zkd8.js} +2 -2
- package/dist/vendor/setup-common.4GIL70qB.js +29 -0
- package/dist/vendor/utils.GbToHGHI.js +41 -0
- package/dist/vendor/{vi.DTC--YO5.js → vi.Bw2UL9c9.js} +21 -8
- package/dist/vendor/vm.9N6CwTZh.js +696 -0
- package/dist/worker.js +109 -82
- package/dist/workers/forks.js +33 -0
- package/dist/{entry-vm.js → workers/runVmTests.js} +20 -16
- package/dist/workers/threads.js +26 -0
- package/dist/workers/vmForks.js +43 -0
- package/dist/workers/vmThreads.js +36 -0
- package/dist/workers.d.ts +36 -0
- package/dist/workers.js +30 -0
- package/package.json +12 -8
- package/workers.d.ts +1 -0
- package/dist/child.js +0 -125
- package/dist/vendor/execute.cedv4NLQ.js +0 -1235
- package/dist/vendor/inspector.lFAeuaAt.js +0 -26
- package/dist/vendor/loader.L9CYwKn1.js +0 -39
- package/dist/vm.js +0 -126
- /package/dist/{paths.js → path.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TaskPopulated, File, TaskResultPack, CancelReason } from '@vitest/runner';
|
|
2
2
|
export { Custom, DoneCallback, ExtendedContext, File, HookCleanupCallback, HookListener, OnTestFailedHandler, RunMode, RuntimeContext, SequenceHooks, SequenceSetupFiles, Suite, SuiteAPI, SuiteCollector, SuiteFactory, SuiteHooks, Task, TaskBase, TaskContext, TaskCustomOptions, TaskMeta, TaskResult, TaskResultPack, TaskState, Test, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
|
|
3
|
-
export { b as bench } from './suite-
|
|
3
|
+
export { b as bench } from './suite-MFRDkZcV.js';
|
|
4
4
|
import { ExpectStatic } from '@vitest/expect';
|
|
5
5
|
export { Assertion, AsymmetricMatchersContaining, ExpectStatic, JestAssertion } from '@vitest/expect';
|
|
6
|
-
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper,
|
|
7
|
-
export {
|
|
6
|
+
import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, r as RuntimeConfig, P as ProvidedContext, A as AfterSuiteRunMeta, t as UserConsoleLog, R as ResolvedConfig, u as ModuleGraphData, v as Reporter } from './reporters-rzC174PQ.js';
|
|
7
|
+
export { Q as ApiConfig, a9 as ArgumentsType, a8 as Arrayable, a6 as Awaitable, B as BaseCoverageOptions, ao as BenchFunction, am as Benchmark, ap as BenchmarkAPI, an as BenchmarkResult, al as BenchmarkUserOptions, L as BuiltinEnvironment, O as CSSModuleScopeStrategy, y as CollectLineNumbers, z as CollectLines, ab as Constructable, G as Context, o as ContextRPC, a2 as ContextTestEnvironment, ai as CoverageIstanbulOptions, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, ah as CoverageReporter, aj as CoverageV8Options, ak as CustomProviderOptions, X as DepsOptimizationOptions, E as Environment, S as EnvironmentOptions, ad as EnvironmentReturn, K as HappyDOMOptions, Z as InlineConfig, J as JSDOMOptions, ac as ModuleCache, aa as MutableArray, a7 as Nullable, af as OnServerRestartHandler, H as Pool, I as PoolOptions, $ as ProjectConfig, w as RawErrsMap, ag as ReportContext, a4 as ResolveIdFunction, a as ResolvedCoverageOptions, a3 as ResolvedTestEnvironment, D as RootAndTarget, a1 as RunnerRPC, f as RuntimeRPC, Y as TransformModePatterns, x as TscErrorInfo, _ as TypecheckConfig, U as UserConfig, a0 as UserWorkspaceConfig, e as Vitest, N as VitestEnvironment, V as VitestRunMode, ae as VmEnvironmentReturn, q as WorkerContext, p as WorkerGlobalState, a5 as WorkerRPC } from './reporters-rzC174PQ.js';
|
|
8
8
|
import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
|
|
9
9
|
export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
|
|
10
10
|
export { SnapshotEnvironment } from '@vitest/snapshot/environment';
|
|
@@ -15,7 +15,6 @@ import { TransformResult } from 'vite';
|
|
|
15
15
|
import * as chai from 'chai';
|
|
16
16
|
export { chai };
|
|
17
17
|
export { assert, should } from 'chai';
|
|
18
|
-
export { UserWorkspaceConfig } from './config.js';
|
|
19
18
|
export { ErrorWithDiff, ParsedStack } from '@vitest/utils';
|
|
20
19
|
export { Bench as BenchFactory, Options as BenchOptions, Task as BenchTask, TaskResult as BenchTaskResult } from 'tinybench';
|
|
21
20
|
import '@vitest/runner/utils';
|
|
@@ -705,6 +704,7 @@ interface WebSocketHandlers {
|
|
|
705
704
|
rerun(files: string[]): Promise<void>;
|
|
706
705
|
updateSnapshot(file?: File): Promise<void>;
|
|
707
706
|
getProvidedContext(): ProvidedContext;
|
|
707
|
+
getUnhandledErrors(): unknown[];
|
|
708
708
|
}
|
|
709
709
|
interface WebSocketEvents extends Pick<Reporter, 'onCollected' | 'onFinished' | 'onTaskUpdate' | 'onUserConsoleLog' | 'onPathsCollected'> {
|
|
710
710
|
onCancel(reason: CancelReason): void;
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, suite, test } from '@vitest/runner';
|
|
2
|
-
export { b as bench } from './vendor/benchmark.
|
|
3
|
-
export { i as isFirstRun,
|
|
4
|
-
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor/vi.
|
|
5
|
-
import { d as dist } from './vendor/index.
|
|
6
|
-
export {
|
|
2
|
+
export { b as bench } from './vendor/benchmark.IlKmJkUU.js';
|
|
3
|
+
export { i as isFirstRun, a as runOnce } from './vendor/run-once.Olz_Zkd8.js';
|
|
4
|
+
export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor/vi.Bw2UL9c9.js';
|
|
5
|
+
import { d as dist } from './vendor/index.vs_-lzuF.js';
|
|
6
|
+
export { b as assertType, g as getRunningMode, i as inject, a as isWatchMode } from './vendor/index.vs_-lzuF.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 './vendor/index.
|
|
12
|
+
import './vendor/index.rJjbcrrp.js';
|
|
13
13
|
import 'pathe';
|
|
14
14
|
import 'std-env';
|
|
15
|
-
import './vendor/global.
|
|
15
|
+
import './vendor/global.CkGT_TMy.js';
|
|
16
16
|
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
17
17
|
import '@vitest/expect';
|
|
18
18
|
import '@vitest/snapshot';
|
|
19
19
|
import '@vitest/utils/error';
|
|
20
20
|
import './vendor/tasks.IknbGB2n.js';
|
|
21
21
|
import '@vitest/utils/source-map';
|
|
22
|
+
import './vendor/base.QYERqzkH.js';
|
|
22
23
|
import './vendor/date.Ns1pGd_X.js';
|
|
23
24
|
import '@vitest/spy';
|
|
24
25
|
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as VitestRunMode, U as UserConfig, e as Vitest, R as ResolvedConfig,
|
|
2
|
-
export { l as BrowserProvider, k as BrowserProviderInitializationOptions, m as BrowserProviderOptions,
|
|
1
|
+
import { V as VitestRunMode, U as UserConfig, d as VitestOptions, e as Vitest, R as ResolvedConfig, P as ProvidedContext, W as WorkspaceProject, f as RuntimeRPC, T as TestSequencer, g as WorkspaceSpec } from './reporters-rzC174PQ.js';
|
|
2
|
+
export { l as BrowserProvider, k as BrowserProviderInitializationOptions, m as BrowserProviderOptions, h as ProcessPool, j as TestSequencerConstructor, i as VitestPackageInstaller, s as startVitest } from './reporters-rzC174PQ.js';
|
|
3
3
|
import { UserConfig as UserConfig$1, Plugin } from 'vite';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import 'vite-node';
|
|
@@ -15,7 +15,7 @@ import 'node:worker_threads';
|
|
|
15
15
|
import 'node:fs';
|
|
16
16
|
import 'chai';
|
|
17
17
|
|
|
18
|
-
declare function createVitest(mode: VitestRunMode, options: UserConfig, viteOverrides?: UserConfig$1): Promise<Vitest>;
|
|
18
|
+
declare function createVitest(mode: VitestRunMode, options: UserConfig, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
19
19
|
|
|
20
20
|
declare function VitestPlugin(options?: UserConfig, ctx?: Vitest): Promise<Plugin[]>;
|
|
21
21
|
|
package/dist/node.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { B as BaseSequencer, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/node.
|
|
1
|
+
export { B as BaseSequencer, b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/node.p6h5JSuL.js';
|
|
2
2
|
import 'pathe';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:process';
|
|
7
7
|
import 'node:fs';
|
|
8
|
-
import './vendor/constants.
|
|
8
|
+
import './vendor/constants.i1PoEnhr.js';
|
|
9
9
|
import './vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
10
10
|
import 'os';
|
|
11
11
|
import 'path';
|
|
@@ -15,43 +15,43 @@ import 'stream';
|
|
|
15
15
|
import 'events';
|
|
16
16
|
import 'fs';
|
|
17
17
|
import 'picocolors';
|
|
18
|
-
import 'vite-node/utils';
|
|
19
18
|
import 'vite-node/client';
|
|
20
19
|
import '@vitest/snapshot/manager';
|
|
21
20
|
import 'vite-node/server';
|
|
22
|
-
import './vendor/index.
|
|
21
|
+
import './vendor/index.rJjbcrrp.js';
|
|
23
22
|
import 'std-env';
|
|
24
23
|
import '@vitest/runner/utils';
|
|
25
24
|
import '@vitest/utils';
|
|
26
|
-
import './vendor/global.
|
|
27
|
-
import './vendor/coverage.
|
|
28
|
-
import './
|
|
25
|
+
import './vendor/global.CkGT_TMy.js';
|
|
26
|
+
import './vendor/coverage.E7sG1b3r.js';
|
|
27
|
+
import './path.js';
|
|
29
28
|
import 'node:v8';
|
|
30
29
|
import 'node:os';
|
|
31
30
|
import 'node:events';
|
|
32
31
|
import 'tinypool';
|
|
33
32
|
import './vendor/index.cAUulNDf.js';
|
|
34
|
-
import './vendor/base.
|
|
33
|
+
import './vendor/base.QYERqzkH.js';
|
|
35
34
|
import 'node:worker_threads';
|
|
36
35
|
import 'node:fs/promises';
|
|
37
36
|
import 'node:perf_hooks';
|
|
38
37
|
import 'execa';
|
|
39
38
|
import '@vitest/utils/source-map';
|
|
40
|
-
import 'node:module';
|
|
41
|
-
import 'local-pkg';
|
|
42
39
|
import 'module';
|
|
43
40
|
import 'acorn-walk';
|
|
44
|
-
import './vendor/reporters.
|
|
45
|
-
import './chunks/runtime-console.
|
|
41
|
+
import './vendor/reporters.cA9x-5v-.js';
|
|
42
|
+
import './chunks/runtime-console.Iloo9fIt.js';
|
|
46
43
|
import 'node:stream';
|
|
47
44
|
import 'node:console';
|
|
48
45
|
import './vendor/date.Ns1pGd_X.js';
|
|
49
46
|
import './vendor/tasks.IknbGB2n.js';
|
|
47
|
+
import 'node:module';
|
|
48
|
+
import 'local-pkg';
|
|
50
49
|
import 'node:crypto';
|
|
50
|
+
import 'vite-node/utils';
|
|
51
51
|
import 'assert';
|
|
52
52
|
import 'magic-string';
|
|
53
53
|
import '@vitest/utils/ast';
|
|
54
54
|
import 'strip-literal';
|
|
55
|
-
import './vendor/environments.
|
|
55
|
+
import './vendor/environments.sU0TD7wX.js';
|
|
56
56
|
import 'node:readline';
|
|
57
57
|
import 'readline';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
|
-
import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
|
|
2
|
+
import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
|
|
3
3
|
import * as _vitest_runner from '@vitest/runner';
|
|
4
4
|
import { File, Test as Test$1, Suite, TaskResultPack, Task, CancelReason, Custom, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
|
5
5
|
import { RawSourceMap, FetchResult, ViteNodeResolveId, ModuleCacheMap, ViteNodeServerOptions } from 'vite-node';
|
|
@@ -417,7 +417,7 @@ declare class Typechecker {
|
|
|
417
417
|
}[]>>;
|
|
418
418
|
clear(): Promise<void>;
|
|
419
419
|
stop(): Promise<void>;
|
|
420
|
-
protected ensurePackageInstalled(
|
|
420
|
+
protected ensurePackageInstalled(ctx: Vitest, checker: string): Promise<void>;
|
|
421
421
|
prepare(): Promise<void>;
|
|
422
422
|
getExitCode(): number | false;
|
|
423
423
|
getOutput(): string;
|
|
@@ -446,6 +446,7 @@ declare class Logger {
|
|
|
446
446
|
done(): void;
|
|
447
447
|
};
|
|
448
448
|
private _clearScreenPending;
|
|
449
|
+
private _highlights;
|
|
449
450
|
constructor(ctx: Vitest, console?: Console);
|
|
450
451
|
log(...args: any[]): void;
|
|
451
452
|
error(...args: any[]): void;
|
|
@@ -454,15 +455,22 @@ declare class Logger {
|
|
|
454
455
|
clearScreen(message: string, force?: boolean): void;
|
|
455
456
|
private _clearScreen;
|
|
456
457
|
printError(err: unknown, options?: ErrorOptions): Promise<void>;
|
|
458
|
+
clearHighlightCache(filename?: string): void;
|
|
459
|
+
highlight(filename: string, source: string): string;
|
|
457
460
|
printNoTestFound(filters?: string[]): void;
|
|
458
461
|
printBanner(): void;
|
|
459
462
|
printUnhandledErrors(errors: unknown[]): Promise<void>;
|
|
460
463
|
printSourceTypeErrors(errors: TypeCheckError[]): Promise<void>;
|
|
461
464
|
}
|
|
462
465
|
|
|
466
|
+
interface InitializeProjectOptions extends UserWorkspaceConfig {
|
|
467
|
+
workspaceConfigPath: string;
|
|
468
|
+
extends?: string;
|
|
469
|
+
}
|
|
463
470
|
declare class WorkspaceProject {
|
|
464
471
|
path: string | number;
|
|
465
472
|
ctx: Vitest;
|
|
473
|
+
options?: InitializeProjectOptions | undefined;
|
|
466
474
|
configOverride: Partial<ResolvedConfig> | undefined;
|
|
467
475
|
config: ResolvedConfig;
|
|
468
476
|
server: ViteDevServer;
|
|
@@ -475,7 +483,7 @@ declare class WorkspaceProject {
|
|
|
475
483
|
testFilesList: string[] | null;
|
|
476
484
|
private _globalSetups;
|
|
477
485
|
private _provided;
|
|
478
|
-
constructor(path: string | number, ctx: Vitest);
|
|
486
|
+
constructor(path: string | number, ctx: Vitest, options?: InitializeProjectOptions | undefined);
|
|
479
487
|
getName(): string;
|
|
480
488
|
isCore(): boolean;
|
|
481
489
|
provide: (key: string, value: unknown) => void;
|
|
@@ -499,7 +507,6 @@ declare class WorkspaceProject {
|
|
|
499
507
|
static createBasicProject(ctx: Vitest): WorkspaceProject;
|
|
500
508
|
static createCoreProject(ctx: Vitest): Promise<WorkspaceProject>;
|
|
501
509
|
setServer(options: UserConfig, server: ViteDevServer): Promise<void>;
|
|
502
|
-
report<T extends keyof Reporter>(name: T, ...args: ArgumentsType$1<Reporter[T]>): Promise<void>;
|
|
503
510
|
isBrowserEnabled(): boolean;
|
|
504
511
|
getSerializableConfig(): ResolvedConfig;
|
|
505
512
|
close(): Promise<unknown>;
|
|
@@ -582,7 +589,7 @@ interface ResolvedBrowserOptions extends BrowserConfigOptions {
|
|
|
582
589
|
api: ApiConfig;
|
|
583
590
|
}
|
|
584
591
|
|
|
585
|
-
type BuiltinPool = 'browser' | 'threads' | 'forks' | 'vmThreads' | 'typescript';
|
|
592
|
+
type BuiltinPool = 'browser' | 'threads' | 'forks' | 'vmThreads' | 'vmForks' | 'typescript';
|
|
586
593
|
type Pool = BuiltinPool | (string & {});
|
|
587
594
|
interface PoolOptions extends Record<string, unknown> {
|
|
588
595
|
/**
|
|
@@ -606,6 +613,14 @@ interface PoolOptions extends Record<string, unknown> {
|
|
|
606
613
|
* This makes tests run faster, but VM module is unstable. Your tests might leak memory.
|
|
607
614
|
*/
|
|
608
615
|
vmThreads?: ThreadsOptions & VmOptions;
|
|
616
|
+
/**
|
|
617
|
+
* Run tests in isolated `node:vm`.
|
|
618
|
+
*
|
|
619
|
+
* Test files are run parallel using `node:child_process` [`fork()`](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options)
|
|
620
|
+
*
|
|
621
|
+
* This makes tests run faster, but VM module is unstable. Your tests might leak memory.
|
|
622
|
+
*/
|
|
623
|
+
vmForks?: ForksOptions & VmOptions;
|
|
609
624
|
}
|
|
610
625
|
interface ThreadsOptions {
|
|
611
626
|
/** Minimum amount of threads to use */
|
|
@@ -799,7 +814,7 @@ interface CliOptions extends UserConfig {
|
|
|
799
814
|
*
|
|
800
815
|
* Returns a Vitest instance if initialized successfully.
|
|
801
816
|
*/
|
|
802
|
-
declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig$1): Promise<Vitest | undefined>;
|
|
817
|
+
declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest | undefined>;
|
|
803
818
|
|
|
804
819
|
type FileStatsCache = Pick<Stats, 'size'>;
|
|
805
820
|
declare class FilesStatsCache {
|
|
@@ -824,6 +839,13 @@ declare class VitestCache {
|
|
|
824
839
|
}>;
|
|
825
840
|
}
|
|
826
841
|
|
|
842
|
+
declare class VitestPackageInstaller {
|
|
843
|
+
ensureInstalled(dependency: string, root: string): Promise<boolean>;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
interface VitestOptions {
|
|
847
|
+
packageInstaller?: VitestPackageInstaller;
|
|
848
|
+
}
|
|
827
849
|
declare class Vitest {
|
|
828
850
|
readonly mode: VitestRunMode;
|
|
829
851
|
config: ResolvedConfig;
|
|
@@ -847,16 +869,13 @@ declare class Vitest {
|
|
|
847
869
|
isFirstRun: boolean;
|
|
848
870
|
restartsCount: number;
|
|
849
871
|
runner: ViteNodeRunner;
|
|
872
|
+
packageInstaller: VitestPackageInstaller;
|
|
850
873
|
private coreWorkspaceProject;
|
|
851
874
|
private resolvedProjects;
|
|
852
875
|
projects: WorkspaceProject[];
|
|
853
876
|
private projectsTestFiles;
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
forksPath: string;
|
|
857
|
-
vmPath: string;
|
|
858
|
-
};
|
|
859
|
-
constructor(mode: VitestRunMode);
|
|
877
|
+
distPath: string;
|
|
878
|
+
constructor(mode: VitestRunMode, options?: VitestOptions);
|
|
860
879
|
private _onRestartListeners;
|
|
861
880
|
private _onClose;
|
|
862
881
|
private _onSetServer;
|
|
@@ -884,7 +903,7 @@ declare class Vitest {
|
|
|
884
903
|
updateSnapshot(files?: string[]): Promise<void>;
|
|
885
904
|
private _rerunTimer;
|
|
886
905
|
private scheduleRerun;
|
|
887
|
-
getModuleProjects(
|
|
906
|
+
getModuleProjects(filepath: string): WorkspaceProject[];
|
|
888
907
|
private unregisterWatcher;
|
|
889
908
|
private registerWatcher;
|
|
890
909
|
/**
|
|
@@ -955,14 +974,14 @@ declare class BasicReporter extends BaseReporter {
|
|
|
955
974
|
reportSummary(files: File[], errors: unknown[]): Promise<void>;
|
|
956
975
|
}
|
|
957
976
|
|
|
958
|
-
interface ListRendererOptions
|
|
977
|
+
interface ListRendererOptions {
|
|
959
978
|
renderSucceed?: boolean;
|
|
960
979
|
logger: Logger;
|
|
961
980
|
showHeap: boolean;
|
|
962
981
|
slowTestThreshold: number;
|
|
963
982
|
mode: VitestRunMode;
|
|
964
983
|
}
|
|
965
|
-
declare function createListRenderer(_tasks: Task[], options: ListRendererOptions
|
|
984
|
+
declare function createListRenderer(_tasks: Task[], options: ListRendererOptions): {
|
|
966
985
|
start(): any;
|
|
967
986
|
update(_tasks: Task[]): any;
|
|
968
987
|
stop(): Promise<any>;
|
|
@@ -971,7 +990,7 @@ declare function createListRenderer(_tasks: Task[], options: ListRendererOptions
|
|
|
971
990
|
|
|
972
991
|
declare class DefaultReporter extends BaseReporter {
|
|
973
992
|
renderer?: ReturnType<typeof createListRenderer>;
|
|
974
|
-
rendererOptions: ListRendererOptions
|
|
993
|
+
rendererOptions: ListRendererOptions;
|
|
975
994
|
private renderSucceedDefault?;
|
|
976
995
|
onPathsCollected(paths?: string[]): void;
|
|
977
996
|
onTestRemoved(trigger?: string): Promise<void>;
|
|
@@ -983,8 +1002,18 @@ declare class DefaultReporter extends BaseReporter {
|
|
|
983
1002
|
onUserConsoleLog(log: UserConsoleLog): void;
|
|
984
1003
|
}
|
|
985
1004
|
|
|
1005
|
+
interface DotRendererOptions {
|
|
1006
|
+
logger: Logger;
|
|
1007
|
+
}
|
|
1008
|
+
declare function createDotRenderer(_tasks: Task[], options: DotRendererOptions): {
|
|
1009
|
+
start(): any;
|
|
1010
|
+
update(_tasks: Task[]): any;
|
|
1011
|
+
stop(): Promise<any>;
|
|
1012
|
+
clear(): void;
|
|
1013
|
+
};
|
|
1014
|
+
|
|
986
1015
|
declare class DotReporter extends BaseReporter {
|
|
987
|
-
renderer?: ReturnType<typeof
|
|
1016
|
+
renderer?: ReturnType<typeof createDotRenderer>;
|
|
988
1017
|
onCollected(): void;
|
|
989
1018
|
onFinished(files?: _vitest_runner.File[], errors?: unknown[]): Promise<void>;
|
|
990
1019
|
onWatcherStart(): Promise<void>;
|
|
@@ -1081,13 +1110,13 @@ declare class JsonReporter implements Reporter {
|
|
|
1081
1110
|
writeReport(report: string): Promise<void>;
|
|
1082
1111
|
}
|
|
1083
1112
|
|
|
1084
|
-
interface
|
|
1113
|
+
interface TableRendererOptions {
|
|
1085
1114
|
renderSucceed?: boolean;
|
|
1086
1115
|
logger: Logger;
|
|
1087
1116
|
showHeap: boolean;
|
|
1088
1117
|
slowTestThreshold: number;
|
|
1089
1118
|
}
|
|
1090
|
-
declare function createTableRenderer(_tasks: Task[], options:
|
|
1119
|
+
declare function createTableRenderer(_tasks: Task[], options: TableRendererOptions): {
|
|
1091
1120
|
start(): any;
|
|
1092
1121
|
update(_tasks: Task[]): any;
|
|
1093
1122
|
stop(): Promise<any>;
|
|
@@ -1096,7 +1125,7 @@ declare function createTableRenderer(_tasks: Task[], options: ListRendererOption
|
|
|
1096
1125
|
|
|
1097
1126
|
declare class TableReporter extends BaseReporter {
|
|
1098
1127
|
renderer?: ReturnType<typeof createTableRenderer>;
|
|
1099
|
-
rendererOptions:
|
|
1128
|
+
rendererOptions: TableRendererOptions;
|
|
1100
1129
|
onTestRemoved(trigger?: string): Promise<void>;
|
|
1101
1130
|
onCollected(): void;
|
|
1102
1131
|
onFinished(files?: _vitest_runner.File[], errors?: unknown[]): Promise<void>;
|
|
@@ -1206,6 +1235,52 @@ interface LinkMapper {
|
|
|
1206
1235
|
type ArgumentsType<T> = T extends (...args: infer A) => any ? A : never;
|
|
1207
1236
|
type ReturnType$1<T> = T extends (...args: any) => infer R ? R : never;
|
|
1208
1237
|
type PromisifyFn<T> = ReturnType$1<T> extends Promise<any> ? T : (...args: ArgumentsType<T>) => Promise<Awaited<ReturnType$1<T>>>;
|
|
1238
|
+
type BirpcResolver = (name: string, resolved: (...args: unknown[]) => unknown) => ((...args: unknown[]) => unknown) | undefined;
|
|
1239
|
+
interface ChannelOptions {
|
|
1240
|
+
/**
|
|
1241
|
+
* Function to post raw message
|
|
1242
|
+
*/
|
|
1243
|
+
post: (data: any, ...extras: any[]) => any | Promise<any>;
|
|
1244
|
+
/**
|
|
1245
|
+
* Listener to receive raw message
|
|
1246
|
+
*/
|
|
1247
|
+
on: (fn: (data: any, ...extras: any[]) => void) => any | Promise<any>;
|
|
1248
|
+
/**
|
|
1249
|
+
* Custom function to serialize data
|
|
1250
|
+
*
|
|
1251
|
+
* by default it passes the data as-is
|
|
1252
|
+
*/
|
|
1253
|
+
serialize?: (data: any) => any;
|
|
1254
|
+
/**
|
|
1255
|
+
* Custom function to deserialize data
|
|
1256
|
+
*
|
|
1257
|
+
* by default it passes the data as-is
|
|
1258
|
+
*/
|
|
1259
|
+
deserialize?: (data: any) => any;
|
|
1260
|
+
}
|
|
1261
|
+
interface EventOptions<Remote> {
|
|
1262
|
+
/**
|
|
1263
|
+
* Names of remote functions that do not need response.
|
|
1264
|
+
*/
|
|
1265
|
+
eventNames?: (keyof Remote)[];
|
|
1266
|
+
/**
|
|
1267
|
+
* Maximum timeout for waiting for response, in milliseconds.
|
|
1268
|
+
*
|
|
1269
|
+
* @default 60_000
|
|
1270
|
+
*/
|
|
1271
|
+
timeout?: number;
|
|
1272
|
+
/**
|
|
1273
|
+
* Custom resolver to resolve function to be called
|
|
1274
|
+
*
|
|
1275
|
+
* For advanced use cases only
|
|
1276
|
+
*/
|
|
1277
|
+
resolver?: BirpcResolver;
|
|
1278
|
+
/**
|
|
1279
|
+
* Custom error handler
|
|
1280
|
+
*/
|
|
1281
|
+
onError?: (error: Error, functionName: string, args: any[]) => boolean | void;
|
|
1282
|
+
}
|
|
1283
|
+
type BirpcOptions<Remote> = EventOptions<Remote> & ChannelOptions;
|
|
1209
1284
|
type BirpcFn<T> = PromisifyFn<T> & {
|
|
1210
1285
|
/**
|
|
1211
1286
|
* Send event without asking for response
|
|
@@ -1236,7 +1311,6 @@ interface RuntimeRPC {
|
|
|
1236
1311
|
resolveId: (id: string, importer: string | undefined, environment: TransformMode) => Promise<ViteNodeResolveId | null>;
|
|
1237
1312
|
getSourceMap: (id: string, force?: boolean) => Promise<RawSourceMap | undefined>;
|
|
1238
1313
|
onFinished: (files: File[], errors?: unknown[]) => void;
|
|
1239
|
-
onWorkerExit: (error: unknown, code?: number) => void;
|
|
1240
1314
|
onPathsCollected: (paths: string[]) => void;
|
|
1241
1315
|
onUserConsoleLog: (log: UserConsoleLog) => void;
|
|
1242
1316
|
onUnhandledError: (err: unknown, type: string) => void;
|
|
@@ -1253,7 +1327,6 @@ interface RunnerRPC {
|
|
|
1253
1327
|
}
|
|
1254
1328
|
interface ContextTestEnvironment {
|
|
1255
1329
|
name: VitestEnvironment;
|
|
1256
|
-
environment?: Environment;
|
|
1257
1330
|
transformMode?: TransformMode;
|
|
1258
1331
|
options: EnvironmentOptions | null;
|
|
1259
1332
|
}
|
|
@@ -1262,16 +1335,18 @@ interface ResolvedTestEnvironment {
|
|
|
1262
1335
|
options: EnvironmentOptions | null;
|
|
1263
1336
|
}
|
|
1264
1337
|
interface ContextRPC {
|
|
1338
|
+
pool: Pool;
|
|
1339
|
+
worker: string;
|
|
1340
|
+
workerId: number;
|
|
1265
1341
|
config: ResolvedConfig;
|
|
1266
1342
|
projectName: string;
|
|
1267
1343
|
files: string[];
|
|
1268
|
-
invalidates?: string[];
|
|
1269
1344
|
environment: ContextTestEnvironment;
|
|
1270
1345
|
providedContext: Record<string, any>;
|
|
1346
|
+
invalidates?: string[];
|
|
1271
1347
|
}
|
|
1272
1348
|
|
|
1273
1349
|
interface WorkerContext extends ContextRPC {
|
|
1274
|
-
workerId: number;
|
|
1275
1350
|
port: MessagePort;
|
|
1276
1351
|
}
|
|
1277
1352
|
type ResolveIdFunction = (id: string, importer?: string) => Promise<ViteNodeResolveId | null>;
|
|
@@ -1297,7 +1372,6 @@ interface WorkerGlobalState {
|
|
|
1297
1372
|
environment: number;
|
|
1298
1373
|
prepare: number;
|
|
1299
1374
|
};
|
|
1300
|
-
isChildProcess?: boolean;
|
|
1301
1375
|
}
|
|
1302
1376
|
|
|
1303
1377
|
type TransformResult = string | Partial<TransformResult$1> | undefined | null | void;
|
|
@@ -1332,8 +1406,8 @@ interface CoverageProviderModule {
|
|
|
1332
1406
|
*/
|
|
1333
1407
|
stopCoverage?(): unknown | Promise<unknown>;
|
|
1334
1408
|
}
|
|
1335
|
-
type CoverageReporter = keyof ReportOptions;
|
|
1336
|
-
type CoverageReporterWithOptions<ReporterName extends CoverageReporter = CoverageReporter> = ReporterName extends
|
|
1409
|
+
type CoverageReporter = keyof ReportOptions | (string & {});
|
|
1410
|
+
type CoverageReporterWithOptions<ReporterName extends CoverageReporter = CoverageReporter> = ReporterName extends keyof ReportOptions ? ReportOptions[ReporterName] extends never ? [ReporterName, {}] : [ReporterName, Partial<ReportOptions[ReporterName]>] : [ReporterName, Record<string, unknown>];
|
|
1337
1411
|
type Provider = 'v8' | 'istanbul' | 'custom' | undefined;
|
|
1338
1412
|
type CoverageOptions<T extends Provider = Provider> = T extends 'istanbul' ? ({
|
|
1339
1413
|
provider: T;
|
|
@@ -1649,6 +1723,76 @@ type BenchmarkAPI = ChainableBenchmarkAPI & {
|
|
|
1649
1723
|
runIf(condition: any): ChainableBenchmarkAPI;
|
|
1650
1724
|
};
|
|
1651
1725
|
|
|
1726
|
+
declare const defaultInclude: string[];
|
|
1727
|
+
declare const defaultExclude: string[];
|
|
1728
|
+
declare const coverageConfigDefaults: ResolvedCoverageOptions;
|
|
1729
|
+
declare const configDefaults: Readonly<{
|
|
1730
|
+
allowOnly: boolean;
|
|
1731
|
+
isolate: true;
|
|
1732
|
+
watch: boolean;
|
|
1733
|
+
globals: false;
|
|
1734
|
+
environment: "node";
|
|
1735
|
+
pool: "threads";
|
|
1736
|
+
clearMocks: false;
|
|
1737
|
+
restoreMocks: false;
|
|
1738
|
+
mockReset: false;
|
|
1739
|
+
include: string[];
|
|
1740
|
+
exclude: string[];
|
|
1741
|
+
testTimeout: number;
|
|
1742
|
+
hookTimeout: number;
|
|
1743
|
+
teardownTimeout: number;
|
|
1744
|
+
watchExclude: string[];
|
|
1745
|
+
forceRerunTriggers: string[];
|
|
1746
|
+
update: false;
|
|
1747
|
+
reporters: never[];
|
|
1748
|
+
silent: false;
|
|
1749
|
+
hideSkippedTests: false;
|
|
1750
|
+
api: false;
|
|
1751
|
+
ui: false;
|
|
1752
|
+
uiBase: string;
|
|
1753
|
+
open: boolean;
|
|
1754
|
+
css: {
|
|
1755
|
+
include: never[];
|
|
1756
|
+
};
|
|
1757
|
+
coverage: CoverageV8Options;
|
|
1758
|
+
fakeTimers: {
|
|
1759
|
+
loopLimit: number;
|
|
1760
|
+
shouldClearNativeTimers: true;
|
|
1761
|
+
toFake: ("setTimeout" | "setInterval" | "clearInterval" | "clearTimeout" | "setImmediate" | "clearImmediate" | "Date")[];
|
|
1762
|
+
};
|
|
1763
|
+
maxConcurrency: number;
|
|
1764
|
+
dangerouslyIgnoreUnhandledErrors: false;
|
|
1765
|
+
typecheck: {
|
|
1766
|
+
checker: "tsc";
|
|
1767
|
+
include: string[];
|
|
1768
|
+
exclude: string[];
|
|
1769
|
+
};
|
|
1770
|
+
slowTestThreshold: number;
|
|
1771
|
+
disableConsoleIntercept: false;
|
|
1772
|
+
}>;
|
|
1773
|
+
|
|
1774
|
+
declare const extraInlineDeps: (string | RegExp)[];
|
|
1775
|
+
|
|
1776
|
+
interface UserWorkspaceConfig extends UserConfig$1 {
|
|
1777
|
+
test?: ProjectConfig;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
type UserConfigFnObject = (env: ConfigEnv) => UserConfig$1;
|
|
1781
|
+
type UserConfigFnPromise = (env: ConfigEnv) => Promise<UserConfig$1>;
|
|
1782
|
+
type UserConfigFn = (env: ConfigEnv) => UserConfig$1 | Promise<UserConfig$1>;
|
|
1783
|
+
type UserConfigExport = UserConfig$1 | Promise<UserConfig$1> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
1784
|
+
type UserProjectConfigFn = (env: ConfigEnv) => UserWorkspaceConfig | Promise<UserWorkspaceConfig>;
|
|
1785
|
+
type UserProjectConfigExport = UserWorkspaceConfig | Promise<UserWorkspaceConfig> | UserProjectConfigFn;
|
|
1786
|
+
declare function defineConfig(config: UserConfig$1): UserConfig$1;
|
|
1787
|
+
declare function defineConfig(config: Promise<UserConfig$1>): Promise<UserConfig$1>;
|
|
1788
|
+
declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
|
|
1789
|
+
declare function defineConfig(config: UserConfigExport): UserConfigExport;
|
|
1790
|
+
declare function defineProject<T extends UserProjectConfigExport>(config: T): T;
|
|
1791
|
+
type Workspace = (string | (UserProjectConfigExport & {
|
|
1792
|
+
extends?: string;
|
|
1793
|
+
}));
|
|
1794
|
+
declare function defineWorkspace(config: Workspace[]): Workspace[];
|
|
1795
|
+
|
|
1652
1796
|
type BuiltinEnvironment = 'node' | 'jsdom' | 'happy-dom' | 'edge-runtime';
|
|
1653
1797
|
type VitestEnvironment = BuiltinEnvironment | (string & Record<never, never>);
|
|
1654
1798
|
|
|
@@ -2217,6 +2361,16 @@ interface InlineConfig {
|
|
|
2217
2361
|
* Show full diff when snapshot fails instead of a patch.
|
|
2218
2362
|
*/
|
|
2219
2363
|
expandSnapshotDiff?: boolean;
|
|
2364
|
+
/**
|
|
2365
|
+
* By default, Vitest automatically intercepts console logging during tests for extra formatting of test file, test title, etc...
|
|
2366
|
+
* This is also required for console log preview on Vitest UI.
|
|
2367
|
+
* However, disabling such interception might help when you want to debug a code with normal synchronus terminal console logging.
|
|
2368
|
+
*
|
|
2369
|
+
* This option has no effect on browser pool since Vitest preserves original logging on browser devtools.
|
|
2370
|
+
*
|
|
2371
|
+
* @default false
|
|
2372
|
+
*/
|
|
2373
|
+
disableConsoleIntercept?: boolean;
|
|
2220
2374
|
}
|
|
2221
2375
|
interface TypecheckConfig {
|
|
2222
2376
|
/**
|
|
@@ -2334,9 +2488,14 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
|
|
|
2334
2488
|
};
|
|
2335
2489
|
runner?: string;
|
|
2336
2490
|
}
|
|
2337
|
-
type ProjectConfig = Omit<UserConfig, 'sequencer' | 'shard' | 'watch' | 'run' | 'cache' | 'update' | 'reporters' | 'outputFile' | '
|
|
2491
|
+
type ProjectConfig = Omit<UserConfig, 'sequencer' | 'shard' | 'watch' | 'run' | 'cache' | 'update' | 'reporters' | 'outputFile' | 'poolOptions' | 'teardownTimeout' | 'silent' | 'watchExclude' | 'forceRerunTriggers' | 'testNamePattern' | 'ui' | 'open' | 'uiBase' | 'snapshotFormat' | 'resolveSnapshotPath' | 'passWithNoTests' | 'onConsoleLog' | 'onStackTrace' | 'dangerouslyIgnoreUnhandledErrors' | 'slowTestThreshold' | 'inspect' | 'inspectBrk' | 'deps' | 'coverage'> & {
|
|
2338
2492
|
sequencer?: Omit<SequenceOptions, 'sequencer' | 'seed'>;
|
|
2339
2493
|
deps?: Omit<DepsOptions, 'moduleDirectories'>;
|
|
2494
|
+
poolOptions?: {
|
|
2495
|
+
threads?: Pick<NonNullable<PoolOptions['threads']>, 'singleThread' | 'isolate'>;
|
|
2496
|
+
vmThreads?: Pick<NonNullable<PoolOptions['vmThreads']>, 'singleThread'>;
|
|
2497
|
+
forks?: Pick<NonNullable<PoolOptions['forks']>, 'singleFork' | 'isolate'>;
|
|
2498
|
+
};
|
|
2340
2499
|
};
|
|
2341
2500
|
type RuntimeConfig = Pick<UserConfig, 'allowOnly' | 'testTimeout' | 'hookTimeout' | 'clearMocks' | 'mockReset' | 'restoreMocks' | 'fakeTimers' | 'maxConcurrency'> & {
|
|
2342
2501
|
sequence?: {
|
|
@@ -2437,4 +2596,4 @@ type Context = RootAndTarget & {
|
|
|
2437
2596
|
lastActivePath?: string;
|
|
2438
2597
|
};
|
|
2439
2598
|
|
|
2440
|
-
export { type
|
|
2599
|
+
export { type ProjectConfig as $, type AfterSuiteRunMeta as A, type BaseCoverageOptions as B, type CoverageOptions as C, type RootAndTarget as D, type Environment as E, type FakeTimerInstallOpts as F, type Context as G, type Pool as H, type PoolOptions as I, type JSDOMOptions as J, type HappyDOMOptions as K, type BuiltinEnvironment as L, type MockFactoryWithHelper as M, type VitestEnvironment as N, type CSSModuleScopeStrategy as O, type ProvidedContext as P, type ApiConfig as Q, type ResolvedConfig as R, type EnvironmentOptions as S, type TestSequencer as T, type UserConfig as U, type VitestRunMode as V, WorkspaceProject as W, type DepsOptimizationOptions as X, type TransformModePatterns as Y, type InlineConfig as Z, type TypecheckConfig as _, type ResolvedCoverageOptions as a, type UserWorkspaceConfig as a0, type RunnerRPC as a1, type ContextTestEnvironment as a2, type ResolvedTestEnvironment as a3, type ResolveIdFunction as a4, type WorkerRPC as a5, type Awaitable as a6, type Nullable as a7, type Arrayable as a8, type ArgumentsType$1 as a9, defineProject as aA, defineWorkspace as aB, configDefaults as aC, defaultInclude as aD, defaultExclude as aE, coverageConfigDefaults as aF, extraInlineDeps as aG, DefaultReporter as aH, BasicReporter as aI, DotReporter as aJ, JsonReporter$1 as aK, VerboseReporter as aL, TapReporter as aM, JUnitReporter as aN, TapFlatReporter as aO, HangingProcessReporter as aP, BaseReporter as aQ, ReportersMap as aR, type BuiltinReporters as aS, BenchmarkReportsMap as aT, type BenchmarkBuiltinReporters as aU, type MutableArray as aa, type Constructable as ab, type ModuleCache as ac, type EnvironmentReturn as ad, type VmEnvironmentReturn as ae, type OnServerRestartHandler as af, type ReportContext as ag, type CoverageReporter as ah, type CoverageIstanbulOptions as ai, type CoverageV8Options as aj, type CustomProviderOptions as ak, type BenchmarkUserOptions as al, type Benchmark as am, type BenchmarkResult as an, type BenchFunction as ao, type BenchmarkAPI as ap, type PendingSuiteMock as aq, type MockFactory as ar, type MockMap as as, type UserConfigFnObject as at, type UserConfigFnPromise as au, type UserConfigFn as av, type UserConfigExport as aw, type UserProjectConfigFn as ax, type UserProjectConfigExport as ay, defineConfig as az, type CoverageProvider as b, type CoverageProviderModule as c, type VitestOptions as d, Vitest as e, type RuntimeRPC as f, type WorkspaceSpec as g, type ProcessPool as h, VitestPackageInstaller as i, type TestSequencerConstructor as j, type BrowserProviderInitializationOptions as k, type BrowserProvider as l, type BrowserProviderOptions as m, type BirpcOptions as n, type ContextRPC as o, type WorkerGlobalState as p, type WorkerContext as q, type RuntimeConfig as r, startVitest as s, type UserConsoleLog as t, type ModuleGraphData as u, type Reporter as v, type RawErrsMap as w, type TscErrorInfo as x, type CollectLineNumbers as y, type CollectLines as z };
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aQ as BaseReporter, aI as BasicReporter, aU as BenchmarkBuiltinReporters, aT as BenchmarkReportsMap, aS as BuiltinReporters, aH as DefaultReporter, aJ as DotReporter, aP as HangingProcessReporter, aN as JUnitReporter, aK as JsonReporter, v as Reporter, aR as ReportersMap, aO as TapFlatReporter, aM as TapReporter, aL as VerboseReporter } from './reporters-rzC174PQ.js';
|
|
2
2
|
import 'vite';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import 'vite-node';
|
package/dist/reporters.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { e as BasicReporter, B as BenchmarkReportsMap, D as DefaultReporter, f as DotReporter, H as HangingProcessReporter, g as JUnitReporter, J as JsonReporter, R as ReportersMap, h as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor/reporters.
|
|
1
|
+
export { e as BasicReporter, B as BenchmarkReportsMap, D as DefaultReporter, f as DotReporter, H as HangingProcessReporter, g as JUnitReporter, J as JsonReporter, R as ReportersMap, h as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor/reporters.cA9x-5v-.js';
|
|
2
2
|
import 'node:perf_hooks';
|
|
3
3
|
import 'picocolors';
|
|
4
|
-
import './vendor/index.
|
|
4
|
+
import './vendor/index.rJjbcrrp.js';
|
|
5
5
|
import 'pathe';
|
|
6
6
|
import 'std-env';
|
|
7
7
|
import '@vitest/runner/utils';
|
|
8
8
|
import '@vitest/utils';
|
|
9
|
-
import './vendor/global.
|
|
10
|
-
import './chunks/runtime-console.
|
|
9
|
+
import './vendor/global.CkGT_TMy.js';
|
|
10
|
+
import './chunks/runtime-console.Iloo9fIt.js';
|
|
11
11
|
import 'node:stream';
|
|
12
12
|
import 'node:console';
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import './vendor/date.Ns1pGd_X.js';
|
|
15
|
-
import './vendor/base.
|
|
15
|
+
import './vendor/base.QYERqzkH.js';
|
|
16
16
|
import './vendor/tasks.IknbGB2n.js';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import '@vitest/utils/source-map';
|
package/dist/runners.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VitestRunner, VitestRunnerImportSource, Suite, Test, CancelReason, Custom, TaskContext, ExtendedContext } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig } from './reporters-
|
|
2
|
+
import { R as ResolvedConfig } from './reporters-rzC174PQ.js';
|
|
3
3
|
import * as tinybench from 'tinybench';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import 'vite-node';
|