Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Apr 23, 2024
1 parent c0281ee commit 0394abc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ describe('GqlService', () => {
url: 'http://test.com',
method: 'post',
query: '{}',
extensions: '{}',
});
expect(mockHttpClient.request).toHaveBeenCalled();
const httpClientArgs = (mockHttpClient.request as any).mock.calls[0];
Expand All @@ -142,6 +143,7 @@ describe('GqlService', () => {
expect(JSON.parse(httpConfigArg.body)).toEqual({
query: '{}',
variables: {},
extensions: {},
operationName: null,
});
expect(httpConfigArg.headers.get('Content-Type')).toBe('application/json');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ interface SendRequestOptions {
method: string;
withCredentials?: boolean;
variables?: string;
extensions: string;
extensions?: string;
headers?: HeaderState;
files?: FileVariable[];
selectedOperation?: SelectedOperation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ describe('PreRequestService', () => {
operationName: '',
query: '',
variables: '',
url: '',
requestExtensions: '',
});

expect(result).toEqual({
Expand All @@ -78,6 +80,8 @@ describe('PreRequestService', () => {
operationName: '',
query: '',
variables: '',
url: '',
requestExtensions: '',
});

expect(result).toEqual({
Expand Down Expand Up @@ -105,6 +109,8 @@ describe('PreRequestService', () => {
operationName: '',
query: '',
variables: '',
url: '',
requestExtensions: '',
});

expect(result).toEqual({
Expand Down Expand Up @@ -132,6 +138,8 @@ describe('PreRequestService', () => {
operationName: '',
query: '',
variables: '',
url: '',
requestExtensions: '',
});

expect(result).toEqual({
Expand Down Expand Up @@ -159,6 +167,8 @@ describe('PreRequestService', () => {
operationName: '',
query: '',
variables: '',
url: '',
requestExtensions: '',
});

expect(result).toEqual({
Expand Down

0 comments on commit 0394abc

Please sign in to comment.