diff --git a/test/github-issues/6642/issue-6642.ts b/test/github-issues/6642/issue-6642.ts index 6ff7d9a43a0..a4ebe8cb777 100644 --- a/test/github-issues/6642/issue-6642.ts +++ b/test/github-issues/6642/issue-6642.ts @@ -21,12 +21,12 @@ describe("github issues > #6642 JoinTable does not respect inverseJoinColumns re enabledDrivers: ["mysql"] }); }); - beforeEach(() => reloadTestingDatabases(connections)); - after(() => closeTestingConnections(connections)); + beforeEach(async () => await reloadTestingDatabases(connections)); + after(async () => await closeTestingConnections(connections)); it("should generate column widths equal to the referenced column widths", async () => { return Promise.all( - connections.map(async function (connection) { + connections.map(async (connection) => { const options = setupSingleTestingConnection( connection.options.type, { @@ -36,11 +36,11 @@ describe("github issues > #6642 JoinTable does not respect inverseJoinColumns re schemaCreate: false } ) as MysqlConnectionOptions; + if (!options) { fail(); } - const migrationConnection = await createConnection(options); try { const sqlInMemory = await migrationConnection.driver @@ -58,7 +58,7 @@ describe("github issues > #6642 JoinTable does not respect inverseJoinColumns re ]); } finally { - connection.close(); + await connection.close(); } }) );