Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

mock-db-setup.test.ts

16 lines369 Bytes

1import { test as setup } from '@playwright/test'
2​
3import { hashPassword, prismaClient } from '../src/utils/prisma'
4​
5setup('create new database', async () => {
6 await prismaClient.user.deleteMany()
7​
8 const email = 'test@gmail.com'
9 const password = await hashPassword('test')
10 await prismaClient.user.create({
11 data: {
12 email,
13 password,
14 },
15 })
16})