mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-09 02:28:59 +03:00
fix(server): missing dependency in sync app (#4465)
This commit is contained in:
parent
bd0ed7f474
commit
7b5157aa89
@ -4,6 +4,7 @@ import { AppController } from './app.controller';
|
||||
import { ConfigModule } from './config';
|
||||
import { MetricsModule } from './metrics';
|
||||
import { BusinessModules } from './modules';
|
||||
import { AuthModule } from './modules/auth';
|
||||
import { PrismaModule } from './prisma';
|
||||
import { SessionModule } from './session';
|
||||
import { StorageModule } from './storage';
|
||||
@ -17,6 +18,7 @@ import { RateLimiterModule } from './throttler';
|
||||
MetricsModule,
|
||||
SessionModule,
|
||||
RateLimiterModule,
|
||||
AuthModule,
|
||||
...BusinessModules,
|
||||
],
|
||||
controllers: [AppController],
|
||||
|
16
apps/server/tests/sync.spec.ts
Normal file
16
apps/server/tests/sync.spec.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { Test } from '@nestjs/testing';
|
||||
import test from 'ava';
|
||||
|
||||
test('should be able to bootstrap sync server', async t => {
|
||||
// set env before import
|
||||
process.env.SERVER_FLAVOR = 'sync';
|
||||
const { AppModule } = await import('../src/app');
|
||||
await t.notThrowsAsync(async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
imports: [AppModule],
|
||||
}).compile();
|
||||
const app = module.createNestApplication();
|
||||
await app.close();
|
||||
});
|
||||
process.env.SERVER_FLAVOR = '';
|
||||
});
|
Loading…
Reference in New Issue
Block a user