Skip to content

Commit

Permalink
test: fix HttpClient tests
Browse files Browse the repository at this point in the history
Increase amount of expected setRequestHeader calls because the
client now also sets the "X-Language" header.
  • Loading branch information
lfleischmann committed Jan 9, 2025
1 parent fc05651 commit f1e72bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/frontend-sdk/tests/lib/client/HttpClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe("httpClient._fetch()", () => {
"Content-Type",
"application/json",
);
expect(xhr.setRequestHeader).toHaveBeenCalledTimes(2);
expect(xhr.setRequestHeader).toHaveBeenCalledTimes(3);
expect(xhr.open).toHaveBeenNthCalledWith(
1,
"GET",
Expand All @@ -73,7 +73,7 @@ describe("httpClient._fetch()", () => {
"Authorization",
`Bearer ${jwt}`,
);
expect(xhr.setRequestHeader).toHaveBeenCalledTimes(3);
expect(xhr.setRequestHeader).toHaveBeenCalledTimes(4);
});

it("should handle onerror", async () => {
Expand Down

0 comments on commit f1e72bd

Please sign in to comment.