import NodeAssert from 'assert'; type ExtendedAssert = { notOk(value: unknown, message?: string | Error): void, match(value: string, test: RegExp, message?: string | Error): void, notMatch(value: string, test: RegExp, message?: string | Error): void, throwsAndCatch(fn: () => unknown, message?: string | Error): Error, equalWithMargin(value: number, test: number, margin?: number, message?: string | Error): void, isFulfilled(promise: Promise, message?: string | Error): Promise, isRejected(promise: Promise, message?: string | Error): Promise, } export const assert: typeof NodeAssert & ExtendedAssert type Spy = { (): unknown lastCall: null | Array called: boolean callCount: number calls: Array> findCall(fn: (args: Array) => boolean): null | Array getCall(index: number): null | Array getCallN(index: number): null | Array onCall(index: number): Spy onCallN(index: number): Spy reset(): Spy returns(data: unknown): Spy throws(data: unknown): Spy resolves(data: unknown): Spy rejects(data: unknown): Spy returnWith(fn: (...args: unknown[]) => unknown): Spy } export function spy(): Spy export function stub(fun?: (...args: unknown[]) => unknown): Spy type Test = { timeout(timeout: number): void skip(): void only(): void } type TestResult = void | Promise type Callback = { (): void wrap(fn: () => unknown): void finish(fn: () => unknown): void } type Eltro = { before(fn: () => TestResult): Test after(fn: () => TestResult): Test beforeEach(fn: () => TestResult): Test afterEachEach(fn: () => TestResult): Test describe(name: string, fn: () => void) timeout(timeout: number): Eltro skip(): Eltro only(): Eltro test(name: string, func: (cb?: Callback) => TestResult): Test } export const Eltro: Eltro