Skip to content

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.

Parameter Type
options? TestWebhooksOptions

TestWebhooks

import { createTestWebhooks, drainDeliveries } from "@xtandard/webhooks/testing";
const { core, dispatcher } = createTestWebhooks();
await core.createApplication({ key: "acme" });
// … create an endpoint, publish, then:
await drainDeliveries(dispatcher);