refactor(server): import prisma from @prisma/client (#5863)

This commit is contained in:
liuyi
2024-02-22 07:46:57 +00:00
parent f2c5786dd0
commit 4d421a324f
24 changed files with 82 additions and 218 deletions
@@ -7,7 +7,6 @@ import {
getLatestMailMessage,
} from '@affine-test/kit/utils/cloud';
import { TestingModule } from '@nestjs/testing';
import { PrismaClient } from '@prisma/client';
import ava, { type TestFn } from 'ava';
import { AuthService } from '../src/core/auth/service';
@@ -20,13 +19,6 @@ const test = ava as TestFn<{
skip: boolean;
}>;
// cleanup database before each test
test.beforeEach(async () => {
const client = new PrismaClient();
await client.$connect();
await client.user.deleteMany({});
});
test.beforeEach(async t => {
t.context.module = await createTestingModule({
imports: [