UNPKG

@dossierhq/integration-test

Version:

Integration test to ensure that different Dossier database adapters work as expected.

21 lines 701 B
/// <reference types="./Builder.d.ts" /> export function buildSuite(context, ...testFunctions) { const suite = {}; for (const testFunction of testFunctions) { const boundTestFunction = async () => { const [functionContext, cleanup] = await context.before(); try { await testFunction(functionContext); } finally { await context.after(cleanup); } }; if (testFunction.timeout !== undefined) { boundTestFunction.timeout = testFunction.timeout; } suite[testFunction.name] = boundTestFunction; } return suite; } //# sourceMappingURL=Builder.js.map