mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
refactor(server): import prisma from @prisma/client (#5863)
This commit is contained in:
@@ -4,14 +4,13 @@ import { randomUUID } from 'node:crypto';
|
||||
import { Transformer } from '@napi-rs/image';
|
||||
import type { INestApplication } from '@nestjs/common';
|
||||
import { hashSync } from '@node-rs/argon2';
|
||||
import { type User } from '@prisma/client';
|
||||
import { PrismaClient, type User } from '@prisma/client';
|
||||
import ava, { type TestFn } from 'ava';
|
||||
import type { Express } from 'express';
|
||||
import request from 'supertest';
|
||||
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { FeatureManagementService } from '../src/core/features';
|
||||
import { PrismaService } from '../src/fundamentals/prisma';
|
||||
import { createTestingApp } from './utils';
|
||||
|
||||
const gql = '/graphql';
|
||||
@@ -52,7 +51,7 @@ test.beforeEach(async t => {
|
||||
imports: [AppModule],
|
||||
tapModule(builder) {
|
||||
builder
|
||||
.overrideProvider(PrismaService)
|
||||
.overrideProvider(PrismaClient)
|
||||
.useClass(FakePrisma)
|
||||
.overrideProvider(FeatureManagementService)
|
||||
.useValue({ canEarlyAccess: () => true });
|
||||
|
||||
Reference in New Issue
Block a user