import type { HttpRequest, HttpRequestTemplate, HttpResponse, Logger, ThymianFormat, ThymianHttpTransaction, } from '../../index.js'; import type { HttpTestCase, HttpTestCaseStep } from './http-test-case.js'; import type { HttpTestHooks } from './http-test-hooks.js'; import type { PipelineItem } from './http-test-pipeline.js'; export type GenerateRequestsOptions = { authenticate?: boolean; validCredentials?: boolean; }; export type HttpTestContextLocals = Record; export interface HttpTestContext< Locals extends HttpTestContextLocals = HttpTestContextLocals, > { format: ThymianFormat; logger: Logger; locals: Locals; sampleRequest( transaction: ThymianHttpTransaction, ): Promise; runRequest(req: HttpRequest): Promise; runHook( name: Hook, payload: HttpTestHooks[Hook]['arg'], ): Promise; skip( testCase: HttpTestCase, reason?: string, ): PipelineItem, Locals>; fail( testCase: HttpTestCase, reason?: string, ): PipelineItem, Locals>; }