Skip to content

Instantly share code, notes, and snippets.

@ismael3s
Created June 2, 2022 04:35
Show Gist options
  • Save ismael3s/92cf45347e330841528f40da0c9482fa to your computer and use it in GitHub Desktop.
Save ismael3s/92cf45347e330841528f40da0c9482fa to your computer and use it in GitHub Desktop.
Typeorm recreate database on each test, your typeorm entity should be with all correct propertys
beforeAll(async () => {
await getConnection().synchronize(true)
})
afterEach(async () => {
await getConnection().synchronize(true)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment