Open History to see the last commit
1import { test as setup } from '@playwright/test'
2β
3import { PrismaClient } from '@prisma/client'
4β
5const prismaClient = new PrismaClient()
6β
7setup('create new database', async () => {
8 if (
9 await prismaClient.user.findUnique({
10 where: {
11 email: 'test2@gmail.com',
12 },
13 })
14 ) {
15 await prismaClient.user.delete({
16 where: {
17 email: 'test2@gmail.com',
18 },
19 })
20 }
21})