From 491ddd50a3aa3ef9a2251d0dcf0dce312b3499ac Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Sun, 28 Mar 2021 17:48:59 +0300 Subject: [PATCH] introspection-test: fix test to correctly check for exceptions (#2995) --- src/type/__tests__/introspection-test.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/type/__tests__/introspection-test.js b/src/type/__tests__/introspection-test.js index ee1b4e6e38..8ac12504b3 100644 --- a/src/type/__tests__/introspection-test.js +++ b/src/type/__tests__/introspection-test.js @@ -1577,13 +1577,12 @@ describe('Introspection', () => { invariant(false, `Called on ${info.parentType.name}::${info.fieldName}`); } - expect(() => - graphqlSync({ - schema, - source, - fieldResolver, - typeResolver, - }), - ).to.not.throw(); + const result = graphqlSync({ + schema, + source, + fieldResolver, + typeResolver, + }); + expect(result).to.not.have.property('errors'); }); });