Skip to content

Commit 5f7f0e3

Browse files
committed
updating types + removing comment
1 parent 31774ce commit 5f7f0e3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
'^.+\\.ts?$': [
2424
'ts-jest',
2525
{
26-
tsconfig: 'tsconfig.json', // Specify your TypeScript config file
26+
tsconfig: 'tsconfig.json',
2727
},
2828
],
2929
},

tests/utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import { ExecutionResult, graphql } from 'graphql';
22
import { getSchema } from '../src/services/ApolloServices/ApolloServerService';
33

4-
async function testGraphQLQuery<T>(query: string, variables?: Record<string, any>) {
4+
async function testGraphQLQuery<T>(query: string, variables?: Record<string, never>): Promise<ExecutionResult<T>> {
55
const schema = await getSchema();
66

7-
return graphql({
7+
const result: Promise<ExecutionResult<T>> = (await graphql({
88
schema,
99
source: query,
1010
variableValues: variables,
11-
}) as unknown as Promise<ExecutionResult<T>>;
11+
})) as Promise<ExecutionResult<T>>;
12+
13+
return result;
1214
}
1315

1416
export { testGraphQLQuery };

0 commit comments

Comments
 (0)