pgNotifyProviderConformanceCases
VariableSignature
const pgNotifyProviderConformanceCases: ConformanceTestCase<NotifyAdapterConformanceContext>[];postgres/src/conformance/notify-provider-conformance.ts:63
Every notify adapter contract case, run through createPgNotifyAdapter over a provider. Run them
one per test in your own test file against a context from createPgNotifyProviderConformanceContext. Works with any test runner.
Example
TypeScript
import { afterAll, test } from "vitest";
const pool = new Pool({ connectionString });
const context = createPgNotifyProviderConformanceContext({
createNotifyProvider: async () => createPgPoolNotifyProvider({ pool }),
});
afterAll(async () => pool.end());
for (const conformanceCase of pgNotifyProviderConformanceCases) {
test(conformanceCase.title, async () => {
await conformanceCase.run(context);
});
}