This commit is contained in:
2026-08-14 16:03:47 +01:00
parent fd53e3f4fb
commit dfdc3b2840
2463 changed files with 186456 additions and 111315 deletions
+26 -6
View File
@@ -1,11 +1,14 @@
import * as tinybench from 'tinybench';
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, TestContext, ImportDuration } from '@vitest/runner';
import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, TestContext, ImportDuration, createTaskCollector, getCurrentSuite, getCurrentTest, getHooks, getFn } from '@vitest/runner';
export { VitestRunner } from '@vitest/runner';
import { S as SerializedConfig } from './chunks/config.d.Cy95HiCx.js';
import { T as Traces } from './chunks/traces.d.402V_yFI.js';
import { S as SerializedConfig } from './chunks/config.d.A1h_Y6Jt.js';
import { T as Traces } from './chunks/traces.d.D2T_R8rx.js';
import { createChainable, matchesTags } from '@vitest/runner/utils';
import { g as getBenchFn, a as getBenchOptions } from './chunks/suite.d.udJtyAgw.js';
import '@vitest/pretty-format';
import '@vitest/snapshot';
import '@vitest/utils/diff';
import './chunks/benchmark.d.DAaHLpsq.js';
declare class NodeBenchmarkRunner implements VitestRunner {
config: SerializedConfig;
@@ -17,7 +20,7 @@ declare class NodeBenchmarkRunner implements VitestRunner {
runTask(): Promise<void>;
}
declare class VitestTestRunner implements VitestRunner {
declare class TestRunner implements VitestRunner {
config: SerializedConfig;
private snapshotClient;
private workerState;
@@ -27,12 +30,12 @@ declare class VitestTestRunner implements VitestRunner {
pool: string;
private _otel;
viteEnvironment: string;
private viteModuleRunner;
constructor(config: SerializedConfig);
importFile(filepath: string, source: VitestRunnerImportSource): unknown;
onCollectStart(file: File): void;
onCleanupWorkerContext(listener: () => unknown): void;
onAfterRunFiles(): void;
getWorkerContext(): Record<string, unknown>;
onAfterRunSuite(suite: Suite): Promise<void>;
onAfterRunTask(test: Task): void;
cancel(_reason: CancelReason): void;
@@ -45,6 +48,23 @@ declare class VitestTestRunner implements VitestRunner {
getImportDurations(): Record<string, ImportDuration>;
trace: <T>(name: string, attributes: Record<string, any> | (() => T), cb?: () => T) => T;
__setTraces(traces: Traces): void;
static createTaskCollector: typeof createTaskCollector;
static getCurrentSuite: typeof getCurrentSuite;
static getCurrentTest: typeof getCurrentTest;
static createChainable: typeof createChainable;
static getSuiteHooks: typeof getHooks;
static getTestFn: typeof getFn;
static setSuiteHooks: typeof getHooks;
static setTestFn: typeof getFn;
static matchesTags: typeof matchesTags;
/**
* @deprecated
*/
static getBenchFn: typeof getBenchFn;
/**
* @deprecated
*/
static getBenchOptions: typeof getBenchOptions;
}
export { NodeBenchmarkRunner, VitestTestRunner };
export { NodeBenchmarkRunner, TestRunner as VitestTestRunner };