Skip to content

Commit fbd943c

Browse files
committed
fix(root-level-limitation.spec.ts): add expect to a test case
1 parent d4f9a1a commit fbd943c

File tree

2 files changed

+173
-218
lines changed

2 files changed

+173
-218
lines changed

packages/plugins/root-level-limitation/__tests__/root-level-limitation.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createSchema, createYoga } from 'graphql-yoga';
2-
import { rootLevelQueryLimit } from '../src/index.js';
2+
import { rootLevelQueryLimit } from '../src/index';
33

44
describe('root-level-limitation', () => {
55
const schema = createSchema({
@@ -87,7 +87,9 @@ describe('root-level-limitation', () => {
8787
'Content-Type': 'application/json',
8888
},
8989
});
90-
})
90+
91+
expect(res.status).toBe(400);
92+
});
9193

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

112114
expect(res.status).toBe(200);
113-
})
115+
});
114116
});

0 commit comments

Comments
 (0)