Created
February 1, 2020 23:01
-
-
Save seandearnaley/18198a2a2f97b7d6d5546056f20a7c51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createTestingConnection } from "./index"; | |
module.exports = async (): Promise<void> => { | |
// code goes here | |
const connection = await createTestingConnection(); | |
await connection.dropDatabase(); | |
console.log("dropped test db"); | |
await connection.synchronize(true); | |
console.log("sync test db"); | |
await connection.runMigrations(); | |
console.log("run migrations on test db"); | |
await connection.close(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment