@eggjs/supertest
Version:
SuperAgent driven library for testing HTTP servers
17 lines (15 loc) • 776 B
TypeScript
import { AgentOptions, App } from "./types.js";
import { AssertFunction, CallbackFunction, ExpectHeader, ResponseError, Test, TestApplication } from "./test.js";
import { Request, RequestOptions } from "./request.js";
import { TestAgent, proxyAgent } from "./agent.js";
//#region src/index.d.ts
/**
* Test against the given `app`,
* returning a new `Test`.
*/
declare function request(app: App, options?: RequestOptions): Request;
declare const _default: ((app: App, options?: RequestOptions) => Request) & {
agent: (app: App, options?: AgentOptions) => TestAgent;
};
//#endregion
export { AssertFunction, CallbackFunction, ExpectHeader, Request, type RequestOptions, ResponseError, Test, TestAgent, TestApplication, proxyAgent as agent, _default as default, request };