Skip to content

Commit 6065578

Browse files
Merge pull request nestjs#327 from xeoneux/patch-1
Create express server if not provided in testing
2 parents 2b1898c + 74d6c37 commit 6065578

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/testing/testing-module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as express from 'express';
12
import * as optional from 'optional';
23
import { NestContainer } from '@nestjs/core/injector/container';
34
import { NestModuleMetatype } from '@nestjs/common/interfaces/modules/module-metatype.interface';
@@ -18,7 +19,7 @@ export class TestingModule extends NestApplicationContext {
1819
super(container, scope, contextModule);
1920
}
2021

21-
public createNestApplication(express?): INestApplication {
22+
public createNestApplication(express = express()): INestApplication {
2223
return new NestApplication(this.container, express);
2324
}
2425

0 commit comments

Comments
 (0)