import { after, afterEach, before, beforeEach, describe as nodeDescribe, test as nodeTest } from "node:test"; type AnyFunction = (...args: any[]) => any; type ThrowMatcher = RegExp | string | Error | ((value: unknown) => boolean) | (new (...args: any[]) => Error); declare const asymmetricMatcher: unique symbol; interface AsymmetricMatcher { readonly [asymmetricMatcher]: true; matches(received: unknown): boolean; } interface MockedFunction { (...args: Parameters): ReturnType; mock: { calls: unknown[][]; }; mockImplementation(implementation: Fn): MockedFunction; mockRestore(): void; mockClear(): void; } declare function createEach(base: AnyFunction): (cases: readonly unknown[]) => (name: string, optionsOrFn?: unknown, maybeFn?: unknown) => void; declare class AsyncExpectation { private readonly received; private readonly mode; private readonly inverted; constructor(received: PromiseLike | T, mode: "resolves" | "rejects", inverted?: boolean); get not(): AsyncExpectation; toBe(expected: unknown): Promise; toEqual(expected: unknown): Promise; toBeNull(): Promise; toBeUndefined(): Promise; toContain(expected: unknown): Promise; toMatchSnapshot(snapshotName?: string): Promise; toMatchInlineSnapshot(snapshot: string): Promise; toThrow(expected?: ThrowMatcher): Promise; toHaveBeenCalled(): Promise; toHaveBeenCalledTimes(expected: number): Promise; toHaveBeenCalledWith(...expectedArgs: unknown[]): Promise; private unwrap; } declare class Expectation { private readonly received; private readonly inverted; constructor(received: T, inverted?: boolean); get not(): Expectation; get resolves(): AsyncExpectation; get rejects(): AsyncExpectation; toBe(expected: unknown): void; toEqual(expected: unknown): void; toBeNull(): void; toBeUndefined(): void; toBeDefined(): void; toContain(expected: unknown): void; toHaveLength(expected: number): void; toBeInstanceOf(expected: new (...args: any[]) => unknown): void; toMatchObject(expected: object): void; toBeTruthy(): void; toBeFalsy(): void; toBeGreaterThan(expected: number | bigint): void; toBeGreaterThanOrEqual(expected: number | bigint): void; toBeLessThan(expected: number | bigint): void; toBeLessThanOrEqual(expected: number | bigint): void; toBeCloseTo(expected: number, precision?: number): void; toMatch(expected: RegExp | string): void; toMatchSnapshot(snapshotName?: string): void; toMatchInlineSnapshot(snapshot: string): void; toThrow(expected?: ThrowMatcher): void; toHaveBeenCalled(): void; toHaveBeenCalledTimes(expected: number): void; toHaveBeenCalledWith(...expectedArgs: unknown[]): void; toHaveProperty(property: PropertyKey, expectedValue?: unknown): void; private assertMatch; } interface ExpectApi { (received: T): Expectation; any(expectedType: unknown): AsymmetricMatcher; } export declare const expect: ExpectApi; export declare function mock undefined>(implementation?: Fn): MockedFunction; export declare function spyOn(object: object, key: string | symbol): MockedFunction; export declare const beforeAll: typeof before; export declare const afterAll: typeof after; export declare const test: typeof nodeTest & { each: ReturnType; }; export declare const it: typeof nodeTest & { each: ReturnType; }; export declare const describe: typeof nodeDescribe; export { afterEach, beforeEach };