refactor(server): use feature model (#9932)

This commit is contained in:
forehalo
2025-02-05 10:27:26 +00:00
parent 0ff8d3af6f
commit 7826e2b7c8
121 changed files with 1723 additions and 3826 deletions
@@ -1,4 +1,3 @@
import { TestingModule } from '@nestjs/testing';
import { PrismaClient } from '@prisma/client';
import ava, { TestFn } from 'ava';
@@ -8,7 +7,7 @@ import { FeatureModule } from '../../core/features';
import { QuotaModule } from '../../core/quota';
import { UserModule } from '../../core/user';
import { Models } from '../../models';
import { createTestingModule, initTestingDB } from '../utils';
import { createTestingModule, type TestingModule } from '../utils';
const test = ava as TestFn<{
auth: AuthService;
@@ -31,7 +30,7 @@ test.before(async t => {
});
test.beforeEach(async t => {
await initTestingDB(t.context.db);
await t.context.m.initTestingDB();
t.context.u1 = await t.context.auth.signUp('u1@affine.pro', '1');
});