Skip to content

Commit 200cb28

Browse files
authored
Fix the test for an async unmet isTypeOf check (#2441)
1 parent ab42b5e commit 200cb28

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/execution/__tests__/executor-test.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ describe('Execute: Handles basic execution tasks', () => {
10021002
});
10031003
});
10041004

1005-
it('fails when an isTypeOf check is not met', () => {
1005+
it('fails when an isTypeOf check is not met', async () => {
10061006
class Special {
10071007
value: string;
10081008

@@ -1058,8 +1058,13 @@ describe('Execute: Handles basic execution tasks', () => {
10581058
});
10591059

10601060
const contextValue = { async: true };
1061-
const asyncResult = execute({ schema, document, rootValue, contextValue });
1062-
expect(asyncResult).to.deep.equal(asyncResult);
1061+
const asyncResult = await execute({
1062+
schema,
1063+
document,
1064+
rootValue,
1065+
contextValue,
1066+
});
1067+
expect(asyncResult).to.deep.equal(result);
10631068
});
10641069

10651070
it('fails when serialize of custom scalar does not return a value', () => {

0 commit comments

Comments
 (0)