Skip to content

Commit d559ad8

Browse files
committed
fix: update tests
1 parent 8326d39 commit d559ad8

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/index.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { ApolloClient, InMemoryCache } from '@apollo/client/core';
1+
import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client/core';
22
import { UpdateDiscussionComment ,AddDiscussionComment, MarkDiscussionCommentAsAnswer, GetDiscussionCount, GetAnswerableDiscussionId} from '../src/generated/graphql';
3+
import fetch from 'cross-fetch';
34
//import { gql } from 'apollo-server';
45
//import { MyMutation, MyQuery } from './myGraphQLQueries';
56

@@ -8,7 +9,7 @@ beforeEach(() => {
89
});
910

1011
const client = new ApolloClient({
11-
uri: 'https://api.github.com/graphql',
12+
link: new HttpLink({ uri: 'https://api.github.com/graphql', fetch }),
1213
headers: {
1314
'x-api-key': 'key-redacted',
1415
},
@@ -243,4 +244,4 @@ describe('Get answerable discussion category id ', () => {
243244
// Verify that the result of the mutation matches the expected result
244245
expect(result).toEqual(expectedResult);
245246
});
246-
})
247+
})

0 commit comments

Comments
 (0)