mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-24 04:06:09 +03:00
17 lines
502 B
TypeScript
17 lines
502 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.module');
|
|
await t.notThrowsAsync(async () => {
|
|
const module = await Test.createTestingModule({
|
|
imports: [AppModule],
|
|
}).compile();
|
|
const app = module.createNestApplication();
|
|
await app.close();
|
|
});
|
|
process.env.SERVER_FLAVOR = '';
|
|
});
|