Testing
Start here
Section titled “Start here”TestAppHandleIntegration-test handle returned byapp.test()(whereappcame fromhost.build()).mockContextConstructs a FlareHttpContext with a synthetic FlareRequest.mockContainerConstructs a minimal Container that resolves tokens from a developer-provided map.inspectBuildCaptures a read-only snapshot of a FlareHost and optional built IFlareApp.AppTestOptionsOptions accepted byapp.test().
Classes
Section titled “Classes”FlareTestErrorThrown by the in-process test harness when the harness itself rejects an invalid input or detects misuse.TestAppHandleIntegration-test handle returned byapp.test()(whereappcame fromhost.build()).
Functions
Section titled “Functions”inspectBuildCaptures a read-only snapshot of a FlareHost and optional built IFlareApp.mockContainerConstructs a minimal Container that resolves tokens from a developer-provided map.mockContextConstructs a FlareHttpContext with a synthetic FlareRequest.
AppInspectSnapshotSnapshot of the built app, when one was passed: presence, kind, and response flags.AppTestOptionsOptions accepted byapp.test().BuildSnapshotThe aggregate snapshot inspectBuild() returns: host, HTTP arc, and app sections.HostInspectSnapshotSnapshot of the host: lifecycle state, config, registration counts, and test-mode flags.HttpArcInspectSnapshotSnapshot of the HTTP arc’s compiled state: routes, pipelines, and router view.MockContainerMinimal DI container surface returned by mockContainer.MockContextOptsOptions accepted bymockContext.PipelineInspectSnapshotSnapshot of one compiled HTTP pipeline: its route, sort score, and exec/CORS shape.RouterInspectSnapshotLive view over the compiled router: match directly and read back segment boundaries.TestRequestInitInit options accepted by a test handle’sfetch(target, init).