mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
@@ -9,7 +9,8 @@ import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.mjs';
|
||||
|
||||
import { AppModule } from '../src/app';
|
||||
import { MailService } from '../src/modules/auth/mailer';
|
||||
import { FeatureManagementService } from '../src/modules/features';
|
||||
import { FeatureKind, FeatureManagementService } from '../src/modules/features';
|
||||
import { Quotas } from '../src/modules/quota';
|
||||
import { PrismaService } from '../src/prisma';
|
||||
import { createWorkspace, getInviteInfo, inviteUser, signUp } from './utils';
|
||||
|
||||
@@ -88,6 +89,32 @@ const FakePrisma = {
|
||||
},
|
||||
};
|
||||
},
|
||||
get features() {
|
||||
return {
|
||||
async findFirst() {
|
||||
return {
|
||||
id: 1,
|
||||
type: FeatureKind.Quota,
|
||||
feature: Quotas[0].feature,
|
||||
configs: Quotas[0].configs,
|
||||
version: Quotas[0].version,
|
||||
createdAt: new Date(),
|
||||
};
|
||||
},
|
||||
};
|
||||
},
|
||||
get userFeatures() {
|
||||
return {
|
||||
async findFirst() {
|
||||
return {
|
||||
createdAt: new Date(),
|
||||
featureId: 1,
|
||||
reason: '',
|
||||
expiredAt: null,
|
||||
};
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
const test = ava as TestFn<{
|
||||
|
||||
Reference in New Issue
Block a user