Skip to content

Commit

Permalink
fix: remove charset from tests
Browse files Browse the repository at this point in the history
axios v0.21.2 [removes the charset from JSON Content-Type
headers](axios/axios#2154). This adjusts the
tests to compensate for that change.
  • Loading branch information
Christopher Kruse committed Jan 3, 2022
1 parent 6dcffa6 commit 89db840
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/axiosInterceptor.test.ts
Expand Up @@ -74,7 +74,7 @@ describe("axios interceptor", () => {
// Assert
const request = moxios.requests.first();
expect(request.headers["Content-Type"]).toEqual(
"application/json;charset=utf-8"
"application/json"
);
});

Expand All @@ -96,7 +96,7 @@ describe("axios interceptor", () => {
// Assert
const request = moxios.requests.first();
expect(request.headers["Content-Type"]).toEqual(
"application/json;charset=utf-8"
"application/json"
);
});
});
2 changes: 1 addition & 1 deletion src/interceptor.test.ts
Expand Up @@ -165,7 +165,7 @@ describe("interceptor", () => {
region: "local",
host: "example.com",
body: '{"foo":"bar"}',
headers: { "Content-Type": "application/json;charset=utf-8" },
headers: { "Content-Type": "application/json" },
},
undefined
);
Expand Down

0 comments on commit 89db840

Please sign in to comment.