import type { TestUtils } from './main.ts'; import type { Server as NodeHttpsServer } from 'node:https'; import { type IncomingMessage, type ServerResponse, type Server as NodeHttpServer } from 'node:http'; /** * Http server utils are used to start the AdonisJS HTTP server * during testing. It provides methods to start and stop the server * for integration testing. * * @example * const testUtils = new TestUtils(app) * const httpUtils = testUtils.httpServer() * * const closeServer = await httpUtils.start() * // Make HTTP requests to test endpoints * await closeServer() // Clean up */ export declare class HttpServerUtils { #private; /** * Creates a new HttpServerUtils instance * * @param utils - The test utils instance */ constructor(utils: TestUtils); /** * Testing hook to start the HTTP server to listen for new request. * The return value is a function to close the HTTP server. * * @param serverCallback - Optional callback to create custom HTTP server instance */ start(serverCallback?: (handler: (req: IncomingMessage, res: ServerResponse) => any) => NodeHttpsServer | NodeHttpServer): Promise<() => Promise>; }