mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(server): missing dependency in sync app (#4465)
This commit is contained in:
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 = '';
|
||||
});
|
||||
Reference in New Issue
Block a user