Skip to content

Commit

Permalink
check body content for json test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshamaju committed Jul 18, 2024
1 parent c4b937a commit 17de48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test("should attach JSON body and headers", async () => {
const spy = Effect.flatMap(Interceptor.Chain, (chain) => {
const headers = new Headers(chain.request.init?.headers);

expect(typeof chain.request.init?.body).toBe("string");
expect(chain.request.init?.body).toBe('{"name":"morpheus","job":"leader"}')
expect(headers.get("Content-Type")).toBe("application/json");
expect(headers.has("Content-Length")).toBeTruthy();

Expand Down

0 comments on commit 17de48e

Please sign in to comment.