createTestWebhooks
function createTestWebhooks(options?): TestWebhooks;Defined in: src/testing.ts:52
An in-memory core + dispatcher for tests. The dispatcher is not started (no timers) and defaults to an immediate three-attempt retry schedule so failure paths drain in a few ticks.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
TestWebhooksOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createTestWebhooks, drainDeliveries } from "@xtandard/webhooks/testing";
const { core, dispatcher } = createTestWebhooks();await core.createApplication({ key: "acme" });// … create an endpoint, publish, then:await drainDeliveries(dispatcher);