Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dorsha committed Sep 30, 2024
1 parent e59227b commit 72feb3e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/sdks/core-js-sdk/test/httpClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,25 @@ describe('httpClient', () => {
cookiePolicy: null,
});

httpClient.get('1/2/3/4', {
headers: { test2: '123' },
queryParams: { test2: '123' },
});

expect(mockFetch).toHaveBeenCalledWith(
'http://descope.com/1/2/3/4?test2=123',
{
body: undefined,
headers: new Headers({
test2: '123',
test: '123',
Authorization: 'Bearer 456',
...descopeHeaders,
}),
method: 'GET',
},
);

httpClient.get('1/2/3', {
headers: { test2: '123' },
queryParams: { test2: '123' },
Expand Down

0 comments on commit 72feb3e

Please sign in to comment.