Files
nest/integration/graphql/e2e/graphql-async-class.spec.ts
2018-12-24 14:45:32 +01:00

40 lines
884 B
TypeScript

/*import { INestApplication } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import * as request from 'supertest';
import { AsyncClassApplicationModule } from '../src/async-options-class.module';
describe('GraphQL (async class)', () => {
let app: INestApplication;
beforeEach(async () => {
app = await NestFactory.create(AsyncClassApplicationModule, {
logger: false,
});
await app.init();
});
it(`should return query result`, () => {
return request(app.getHttpServer())
.post('/graphql')
.send({
operationName: null,
variables: {},
query: '{\n getCats {\n id\n }\n}\n',
})
.expect(200, {
data: {
getCats: [
{
id: 1,
},
],
},
});
});
afterEach(async () => {
await app.close();
});
});
*/