interface IAssertionResult { pass: boolean; actual: unknown; expected: T; description: string; operator: string; at?: string; } interface ComparatorAssertionFunction { (actual: unknown, expected: T, description?: string): IAssertionResult; } interface BooleanAssertionFunction { (actual: unknown, description?: string): IAssertionResult; } type ErrorAssertionFunction = { ( fn: Function, expected: RegExp | Function, description?: string ): IAssertionResult; (fn: Function, description?: string): IAssertionResult; }; interface MessageAssertionFunction { (message?: string): IAssertionResult; } interface IAssert$1 { equal: ComparatorAssertionFunction; equals: ComparatorAssertionFunction; eq: ComparatorAssertionFunction; deepEqual: ComparatorAssertionFunction; notEqual: ComparatorAssertionFunction; notEquals: ComparatorAssertionFunction; notEq: ComparatorAssertionFunction; notDeepEqual: ComparatorAssertionFunction; is: ComparatorAssertionFunction; same: ComparatorAssertionFunction; isNot: ComparatorAssertionFunction; notSame: ComparatorAssertionFunction; ok: BooleanAssertionFunction; truthy: BooleanAssertionFunction; notOk: BooleanAssertionFunction; falsy: BooleanAssertionFunction; fail: MessageAssertionFunction; throws: ErrorAssertionFunction; } interface INewTestMessageInput { description: string; skip: boolean; } interface ITestEndMessageInput { description: string; executionTime: number; } interface IMessage { type: string; data: T; } interface INewTestMessage extends IMessage { type: 'TEST_START'; } interface IAssertionMessage extends IMessage> { type: 'ASSERTION'; } interface ITestEndMessage extends IMessage { type: 'TEST_END'; } interface IErrorMessage extends IMessage<{ error: unknown }> { type: 'ERROR'; } type Message = | IAssertionMessage | IErrorMessage | ITestEndMessage | INewTestMessage; interface IReporter { (messageStream: AsyncIterable): Promise; } interface ILogOptions { log?: (message: any) => void; serialize?: (value: any) => string; } declare function createJSONReporter(opts?: ILogOptions): IReporter; declare function createTAPReporter(opts?: ILogOptions): IReporter; interface IReportOptions { reporter: IReporter; } interface IHarnessOptions { onlyMode?: boolean; } interface ITester { test: ITestFunction; skip: ITestFunction; only: ITestFunction; } interface IAssert extends IAssert$1, ITester {} interface ISpecFunction { (assert: IAssert): any; } interface ITestOptions { skip?: boolean; timeout?: number; } interface ITestFunction { ( description: string, spec: ISpecFunction, opts?: ITestOptions ): Promise & AsyncIterable; } interface ITestHarness extends ITester { report(opts: IReportOptions): ReturnType; } declare let Assert: IAssert; declare function hold(): void; declare function report(opts: IReportOptions): ReturnType; declare function createHarness(opts: IHarnessOptions): ITestHarness; declare const test: ITestFunction; declare const only: ITestFunction; declare const skip: ITestFunction; export { Assert, IAssert, IHarnessOptions, ILogOptions, IReportOptions, ISpecFunction, ITestFunction, ITestHarness, ITestOptions, ITester, createHarness, createJSONReporter, createTAPReporter, hold, only, report, skip, test };