diff --git a/test/utils.js b/test/utils.js index 06e6dae..92c2a85 100644 --- a/test/utils.js +++ b/test/utils.js @@ -48,10 +48,10 @@ const _runQuery = function({ ); applySchemaCustomDirectives(executionSchema); - - return graphql(executionSchema, query, input, { + const contextValue = context || { req: {body: {query, variables: {}}} - }); + }; + return graphql(executionSchema, query, input, contextValue); }; exports.testEqual = function({