export { expect } from "./expect.js"; export interface TestContext { skip: (reason?: string) => never; } export type TestFn = (ctx: TestContext) => void | Promise; export interface SuspendedContext extends TestContext { resume: () => Promise; } export type SuspendedFn = (ctx: SuspendedContext) => void | Promise; export interface SuiteContext { skip: (reason?: string) => void; } export type SuiteFn = (ctx: SuiteContext) => void; export type Launch = "shared" | "isolated" | "suspended"; type Mode = "run" | "skip"; export interface TestOptions { launch?: Launch; timeout?: number; } export interface BenchOptions extends TestOptions { warmup?: number; iterations?: number; } export interface BenchContext extends TestContext { measure: (body: () => unknown) => Promise; } export type BenchFn = (ctx: BenchContext) => void | Promise; export interface BenchSamples { iterations: number; /** The wall sampler's unit: 1µs from WallClockSampler, 1000 from the Date.now() fallback. */ tickUs: number; wallUs: number[]; userUs?: number[]; counters: Record; } type Thunk = () => void | Promise; interface Suite { parent: Suite | null; beforeEach: Thunk[]; afterEach: Thunk[]; skipped: boolean; skipReason?: string; } interface TestCase { name: string; fn: Thunk; mode: Mode; launch: Launch; suite: Suite; timeout?: number; samples?: BenchSamples; } export interface RunOptions { grep?: string; only?: number[]; } export declare function describe(label: string, fn: SuiteFn): void; export declare function beforeEach(fn: Thunk): void; export declare function afterEach(fn: Thunk): void; export declare const test: ((name: string, fn: TestFn, opts?: TestOptions) => TestCase) & { skip: (name: string, fn: TestFn, opts?: TestOptions) => TestCase; isolated: (name: string, fn: TestFn, opts?: TestOptions) => TestCase; suspended: (name: string, fn: SuspendedFn, opts?: TestOptions) => TestCase; }; export declare const bench: ((name: string, fn: BenchFn, opts?: BenchOptions) => void) & { isolated: (name: string, fn: BenchFn, opts?: BenchOptions) => void; }; export declare function counter(name: string, target: object, method: string): void; export declare function counter(name: string, fn: NativePointer): void; export declare function run(options?: RunOptions): Promise; //# sourceMappingURL=runtime.d.ts.map