mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(server): add model base (#9734)
This commit is contained in:
@@ -13,9 +13,7 @@ interface Context {
|
||||
const test = ava as TestFn<Context>;
|
||||
|
||||
test.before(async t => {
|
||||
const module = await createTestingModule({
|
||||
providers: [FeatureModel],
|
||||
});
|
||||
const module = await createTestingModule({});
|
||||
|
||||
t.context.feature = module.get(FeatureModel);
|
||||
t.context.module = module;
|
||||
|
||||
@@ -18,9 +18,7 @@ interface Context {
|
||||
const test = ava as TestFn<Context>;
|
||||
|
||||
test.before(async t => {
|
||||
const module = await createTestingModule({
|
||||
providers: [SessionModel],
|
||||
});
|
||||
const module = await createTestingModule({});
|
||||
|
||||
t.context.session = module.get(SessionModel);
|
||||
t.context.user = module.get(UserModel);
|
||||
|
||||
@@ -17,9 +17,7 @@ interface Context {
|
||||
const test = ava as TestFn<Context>;
|
||||
|
||||
test.before(async t => {
|
||||
const module = await createTestingModule({
|
||||
providers: [UserModel],
|
||||
});
|
||||
const module = await createTestingModule({});
|
||||
|
||||
t.context.user = module.get(UserModel);
|
||||
t.context.module = module;
|
||||
|
||||
@@ -17,9 +17,7 @@ interface Context {
|
||||
const test = ava as TestFn<Context>;
|
||||
|
||||
test.before(async t => {
|
||||
const module = await createTestingModule({
|
||||
providers: [VerificationTokenModel],
|
||||
});
|
||||
const module = await createTestingModule({});
|
||||
|
||||
t.context.verificationToken = module.get(VerificationTokenModel);
|
||||
t.context.db = module.get(PrismaClient);
|
||||
|
||||
Reference in New Issue
Block a user