import { INestApplication } from '@nestjs/common' ; import { Test , TestingModule } from '@nestjs/testing' ; import * as request from 'supertest' ; import { AppModule } from '../src/app.module' ; import { END_POINT } from '../src/environments' ; describe ( 'AppModule (e2e)' , ( ) => { let app ; beforeEach ( async ( ) => { const moduleFixture = await Test . createTestingModule ( { imports : [ AppModule ] } ) . compile ( ) ; app = moduleFixture . createNestApplication ( ) ; await app . init ( ) ; } ) ; it ( 'QUERY › hello' , ( ) => { return request ( app . getHttpServer ( ) ) . post ( `/${ END_POINT }` ) . send ( { operationName : null , variables : { } , query : '{ hello }' } ) . expect ( 200 ) ; } ) ; } ) ;