Testing
The helpers of @dotpress/testing, built on Vitest. For guides, see Testing and Testing helpers.
createTestApp()
Creates an app on the memory adapter. It takes the options of createApp(), except adapter, which takes the options of the memory adapter, and logger, a memory logger (a new one by default).
memoryAdapter()
The adapter of createTestApp(), for an app created by your own code: createTasksApp({ adapter: memoryAdapter() }). Its fetch(request) takes a Web Request.
createMemoryLogger()
A logger that records its lines in entries ({ level, args }) instead of printing them.
Assertions
The source of events is a fake event bus (createFakeEventBus()) or a memory transport; the outbox is the memory provider of the mailer. A failed assertion throws an ExpectationError that lists what was emitted or sent.
AWS Lambda
@dotpress/testing/conformance
The conformance suite of the adapters: see Writing an adapter.
A TestTarget has fetch(path, init?) and close(), which does nothing by default.