mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08:00
refactor(server): import prisma from @prisma/client (#5863)
This commit is contained in:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user