bugfix: fix broken unit test example
This commit is contained in:
parent
7b918538db
commit
52e1cc679a
File diff suppressed because it is too large
Load Diff
|
|
@ -12,6 +12,7 @@
|
|||
"start:hmr": "node dist/server",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:cov": "jest --coverage",
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json",
|
||||
"webpack": "webpack --config webpack.config.js"
|
||||
|
|
@ -22,6 +23,7 @@
|
|||
"@nestjs/microservices": "^5.0.0",
|
||||
"@nestjs/testing": "^5.0.0",
|
||||
"@nestjs/websockets": "^5.0.0",
|
||||
"reflect-metadata": "^0.1.12",
|
||||
"rxjs": "^5.5.6",
|
||||
"typescript": "^2.6.2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
|
||||
describe('AppController', () => {
|
||||
let app: TestingModule;
|
||||
|
|
@ -8,6 +9,7 @@ describe('AppController', () => {
|
|||
beforeAll(async () => {
|
||||
app = await Test.createTestingModule({
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
}).compile();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ describe('AppController (e2e)', () => {
|
|||
await app.init();
|
||||
});
|
||||
|
||||
it('/GET /', () => {
|
||||
it('/ (GET)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/')
|
||||
.expect(200)
|
||||
|
|
|
|||
Loading…
Reference in New Issue