UNPKG

@3wks/generator-gae-node-nestjs

Version:

A generator for building nestjs apps on app engine node

25 lines (20 loc) 609 B
import request from 'supertest'; import { Test } from '@nestjs/testing'; import { ApplicationModule } from './../src/app.module'; import { INestApplication } from '@nestjs/common'; describe('AppController (e2e)', () => { let app: INestApplication; beforeAll(async () => { const moduleFixture = await Test.createTestingModule({ imports: [ApplicationModule], }).compile(); app = moduleFixture.createNestApplication(); await app.init(); }); it('/GET /', () => { return request(app.getHttpServer()) .get('/') .expect(200) .expect('Hello World!'); }); });