notifyAdapterConformanceCases
VariableSignature
const notifyAdapterConformanceCases: ConformanceTestCase<NotifyAdapterConformanceContext>[];core/src/conformance.notify-adapter/notify-adapter-cases.ts:28
The notify adapter conformance cases, to run one per test in your own test file.
Each case creates its own adapter with the context's createNotifyAdapter and closes it when
the case ends, and runs in the adapter's mode: over a sync adapter (sync: true) every call
must return a plain value and throw rather than reject, and the cases wait only for delivery.
Works with any test runner.
Example
TypeScript
import { test } from "bun:test";
const context: NotifyAdapterConformanceContext = {
createNotifyAdapter: async () => createMyNotifyAdapter({ url: process.env.BROKER_URL }),
};
for (const conformanceCase of notifyAdapterConformanceCases) {
test(conformanceCase.title, async () => {
await conformanceCase.run(context);
});
}