feature: make typescript starter more robust

This commit is contained in:
Kamil Myśliwiec
2018-03-26 20:39:15 +02:00
parent d5a02606d6
commit 794c2abdde
14 changed files with 8978 additions and 65 deletions
+20
View File
@@ -0,0 +1,20 @@
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import { AppController } from './app.controller';
describe('AppController', () => {
let app: TestingModule;
beforeAll(async () => {
app = await Test.createTestingModule({
controllers: [AppController],
}).compile();
});
describe('root', () => {
it('should return "Hello World!"', () => {
const appController = app.get<AppController>(AppController);
expect(appController.root()).toBe('Hello World!');
});
});
});