From 9c4cfb842abdb881e8bf1ed6dbc8d1b23fc4a2df Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Fri, 7 Feb 2020 14:06:58 +0100 Subject: [PATCH] Fix the test for an async unmet isTypeOf check --- src/execution/__tests__/executor-test.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/execution/__tests__/executor-test.js b/src/execution/__tests__/executor-test.js index 0bb8dc02a0..7a06d98780 100644 --- a/src/execution/__tests__/executor-test.js +++ b/src/execution/__tests__/executor-test.js @@ -1002,7 +1002,7 @@ describe('Execute: Handles basic execution tasks', () => { }); }); - it('fails when an isTypeOf check is not met', () => { + it('fails when an isTypeOf check is not met', async () => { class Special { value: string; @@ -1058,8 +1058,13 @@ describe('Execute: Handles basic execution tasks', () => { }); const contextValue = { async: true }; - const asyncResult = execute({ schema, document, rootValue, contextValue }); - expect(asyncResult).to.deep.equal(asyncResult); + const asyncResult = await execute({ + schema, + document, + rootValue, + contextValue, + }); + expect(asyncResult).to.deep.equal(result); }); it('fails when serialize of custom scalar does not return a value', () => {