Skip to content

Commit

Permalink
fix: test for formData unsupported Content-Type header
Browse files Browse the repository at this point in the history
The expectations weren't included in the `throwAsync()`.
  • Loading branch information
b-marques committed Oct 24, 2023
1 parent c450b37 commit b84e8d1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/core/test/standards/http.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,10 @@ test("Body: formData: throw error on unsupported Content-Type header", async (t)
headers: { "content-type": "application/json" },
})
);
await t.throwsAsync(body.formData()),
{
instanceOf: TypeError,
message: "Unsupported content type: application/json",
};
await t.throwsAsync(body.formData(), {
instanceOf: TypeError,
message: "Unsupported content type: application/json",
});
});
test("Request: constructing from BaseRequest doesn't create new BaseRequest unless required", (t) => {
// Check properties of Request are same as BaseRequest if not RequestInit passed
Expand Down

0 comments on commit b84e8d1

Please sign in to comment.