Skip to content

Commit

Permalink
prisma
Browse files Browse the repository at this point in the history
  • Loading branch information
revmischa committed Jul 2, 2024
1 parent fcf29ff commit 283024d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/src/db/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ vi.mock('@backend/db/client', async () => {
/**
* Define a database integration test suite.
* Clears DB contents after running each test in an isolated transaction.
*
* ⚠️ This must be imported first in your test suite!
*/
export const describeIntegrationTest = (title: string, inner: () => void) => {
beforeEach(async () => {
await prismaTestingHelper.startNewTransaction()
})

afterEach(async () => {
afterEach(() => {
prismaTestingHelper?.rollbackCurrentTransaction()
})

Expand Down

0 comments on commit 283024d

Please sign in to comment.