Updated dependencies, added jest, ts-ject, supertest and supporting types.

Added minimum jest configuration to package.json.
Added allowSyntheticDefaultImports to tsconfig.
Added sample e2e test for app controller.
This commit is contained in:
Brandon Taylor
2017-12-17 12:33:45 -05:00
parent cd6e046a3a
commit 28f8258864
4 changed files with 3991 additions and 13 deletions
+25
View File
@@ -0,0 +1,25 @@
import express from 'express';
import request from 'supertest';
import { Test } from '@nestjs/testing';
import { ApplicationModule } from './app.module';
describe('Basic E2E Test', () => {
const server = express();
beforeAll(async () => {
const module = await Test.createTestingModule({
modules: [ApplicationModule]
})
.compile();
const app = module.createNestApplication(server);
await app.init();
});
it('/GET /', () => {
return request(server)
.get('/')
.expect(200)
.expect('Hello World!');
});
});