@@ -329,72 +329,6 @@ describe('TodoItemResolver (typegoose - e2e)', () => {
329329 ] ) ;
330330 } ) ) ;
331331
332- // it(`should allow querying on subTasks`, () => {
333- // return request(app.getHttpServer())
334- // .post('/graphql')
335- // .send({
336- // operationName: null,
337- // variables: {},
338- // query: `{
339- // todoItems(filter: { subTasks: { title: { in: ["Create Nest App - Sub Task 1", "Create Entity - Sub Task 1"] } } }) {
340- // ${pageInfoField}
341- // ${edgeNodes(todoItemFields)}
342- // totalCount
343- // }
344- // }`,
345- // })
346- // .expect(200)
347- // .then(({ body }) => {
348- // const { edges, totalCount, pageInfo }: CursorConnectionType<TodoItemDTO> = body.data.todoItems;
349- // expect(pageInfo).toEqual({
350- // endCursor: 'eyJ0eXBlIjoia2V5c2V0IiwiZmllbGRzIjpbeyJmaWVsZCI6ImlkIiwidmFsdWUiOjJ9XX0=',
351- // hasNextPage: false,
352- // hasPreviousPage: false,
353- // startCursor: 'eyJ0eXBlIjoia2V5c2V0IiwiZmllbGRzIjpbeyJmaWVsZCI6ImlkIiwidmFsdWUiOjF9XX0=',
354- // });
355- // expect(totalCount).toBe(2);
356- // expect(edges).toHaveLength(2);
357- //
358- // expect(edges.map((e) => e.node)).toEqual([
359- // { id: '1', title: 'Create Nest App', completed: true, description: null, age: expect.any(Number) },
360- // { id: '2', title: 'Create Entity', completed: false, description: null, age: expect.any(Number) },
361- // ]);
362- // });
363- // });
364- //
365- // it(`should allow querying on tags`, () => {
366- // return request(app.getHttpServer())
367- // .post('/graphql')
368- // .send({
369- // operationName: null,
370- // variables: {},
371- // query: `{
372- // todoItems(filter: { tags: { name: { eq: "Home" } } }, sorting: [{field: id, direction: ASC}]) {
373- // ${pageInfoField}
374- // ${edgeNodes(todoItemFields)}
375- // totalCount
376- // }
377- // }`,
378- // })
379- // .expect(200)
380- // .then(({ body }) => {
381- // const { edges, totalCount, pageInfo }: CursorConnectionType<TodoItemDTO> = body.data.todoItems;
382- // expect(pageInfo).toEqual({
383- // endCursor: 'eyJ0eXBlIjoia2V5c2V0IiwiZmllbGRzIjpbeyJmaWVsZCI6ImlkIiwidmFsdWUiOjR9XX0=',
384- // hasNextPage: false,
385- // hasPreviousPage: false,
386- // startCursor: 'eyJ0eXBlIjoia2V5c2V0IiwiZmllbGRzIjpbeyJmaWVsZCI6ImlkIiwidmFsdWUiOjF9XX0=',
387- // });
388- // expect(totalCount).toBe(2);
389- // expect(edges).toHaveLength(2);
390- //
391- // expect(edges.map((e) => e.node)).toEqual([
392- // { id: '1', title: 'Create Nest App', completed: true, description: null, age: expect.any(Number) },
393- // { id: '4', title: 'Add Todo Item Resolver', completed: false, description: null, age: expect.any(Number) },
394- // ]);
395- // });
396- // });
397-
398332 it ( `should allow sorting` , ( ) =>
399333 request ( app . getHttpServer ( ) )
400334 . post ( '/graphql' )
0 commit comments