fix(server): missing dependency in sync app (#4465)

This commit is contained in:
LongYinan
2023-09-22 14:32:45 -07:00
committed by GitHub
parent bd0ed7f474
commit 7b5157aa89
2 changed files with 18 additions and 0 deletions

View 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 = '';
});