This commit is contained in:
Jan Prochazka
2021-05-27 13:50:49 +02:00
parent f360ba7187
commit d7e7b97fb8
2 changed files with 7 additions and 6 deletions

View File

@@ -44,11 +44,12 @@ async function connect(engine, database) {
}
}
const testWrapper = body => async (label, engine, ...other) => {
const testWrapper = body => async (label, ...other) => {
const engine = other[other.length - 1];
const driver = requireEngineDriver(engine.connection);
const conn = await connect(engine, randomDbName());
try {
await body(conn, driver, engine, ...other);
await body(conn, driver, ...other);
} finally {
await driver.close(conn);
}