import Router from "@koa/router"; import type { Environment } from "../app/config.js"; import MailcatcherAPI from "./mailcatcher.js"; import MockRestApi from "./rest-api.js"; import { TestApp } from "./test-app.js"; export type TestAppConstructor = new (uniq_id: string, env: Environment, port: number, base_url: string) => T; type CallbackParams = { app: FinalTestAppType; base_url: string; smtp_api_url: string; rest_api: MockRestApi; port: number; mail_api: MailcatcherAPI; app_class: TestAppConstructor; uniq_id: string; env: Environment; router: Router; }; type TestCallback = (params: CallbackParams) => Promise; type extendFn = null | ((app_class: TestAppConstructor) => TestAppConstructor); export declare function withStoppedApp(extend_fn: extendFn, cb: TestCallback, test_collection?: string): Promise; export declare function withRunningApp(extend_fn: extendFn, cb: TestCallback, test_collection?: string): Promise; export declare function withTestApp(auto_start: boolean, env: Environment, extend_fn: extendFn, fn: (params: CallbackParams) => Promise, test_collection?: string): Promise; export {};