Skip to content

Commit

Permalink
fix: add await so that promises are resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-golden committed Jul 22, 2020
1 parent 7685c17 commit 534b7b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/github-issues/6642/issue-6642.ts
Expand Up @@ -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,
{
Expand All @@ -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
Expand All @@ -58,7 +58,7 @@ describe("github issues > #6642 JoinTable does not respect inverseJoinColumns re
]);

} finally {
connection.close();
await connection.close();
}
})
);
Expand Down

0 comments on commit 534b7b6

Please sign in to comment.