Skip to content

Commit

Permalink
fix(root-level-limitation.spec.ts): add expect to a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
srcgrp committed Apr 15, 2024
1 parent d4f9a1a commit fbd943c
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 218 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSchema, createYoga } from 'graphql-yoga';
import { rootLevelQueryLimit } from '../src/index.js';
import { rootLevelQueryLimit } from '../src/index';

describe('root-level-limitation', () => {
const schema = createSchema({
Expand Down Expand Up @@ -87,7 +87,9 @@ describe('root-level-limitation', () => {
'Content-Type': 'application/json',
},
});
})

expect(res.status).toBe(400);
});

it('should allow requests with max root level query in comments', async () => {
const res = await yoga.fetch('http://yoga/graphql', {
Expand All @@ -110,5 +112,5 @@ describe('root-level-limitation', () => {
});

expect(res.status).toBe(200);
})
});
});

0 comments on commit fbd943c

Please sign in to comment.