We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f636303 commit 81bbeecCopy full SHA for 81bbeec
src/__tests__/handler.ts
@@ -190,7 +190,7 @@ it('should print plain errors in detail', async () => {
190
});
191
192
it('should format errors using the formatter', async () => {
193
- const formatErrorFn = jest.fn(() => new Error('Formatted'));
+ const formatErrorFn = jest.fn((_err) => new Error('Formatted'));
194
const server = startTServer({
195
formatError: formatErrorFn,
196
@@ -207,4 +207,7 @@ it('should format errors using the formatter', async () => {
207
}
208
`);
209
expect(formatErrorFn).toBeCalledTimes(1);
210
+ expect(formatErrorFn.mock.lastCall?.[0]).toMatchInlineSnapshot(
211
+ `[GraphQLError: Cannot query field "idontexist" on type "Query".]`,
212
+ );
213
0 commit comments