Skip to content

Commit 20876cb

Browse files
committed
chore: access prismaPostgresTestContext directly
1 parent 89d1290 commit 20876cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ In your setupFile, `vitest.setup.ts`, mock your local Prisma client with the cli
106106
import { vi } from 'vitest';
107107

108108
vi.mock('./generated/prisma-client', () => ({
109-
default: globalThis.prismaPostgresTestContext.client,
109+
default: prismaPostgresTestContext.client,
110110
}));
111111
```
112112

src/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { afterEach, beforeEach } from 'vitest';
22

3-
beforeEach(globalThis.prismaPostgresTestContext.beginTestTransaction);
4-
afterEach(globalThis.prismaPostgresTestContext.endTestTransaction);
3+
beforeEach(prismaPostgresTestContext.beginTestTransaction);
4+
afterEach(prismaPostgresTestContext.endTestTransaction);

0 commit comments

Comments
 (0)