mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-14 13:35:31 +03:00
17 lines
495 B
TypeScript
17 lines
495 B
TypeScript
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 = '';
|
|
});
|