From 6afa4c0180683440510d2bc08b0a999ef4404185 Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Tue, 22 Oct 2024 11:54:52 -0700 Subject: [PATCH] Fix tests. --- spec/v1/providers/https.spec.ts | 2 +- spec/v2/providers/https.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/v1/providers/https.spec.ts b/spec/v1/providers/https.spec.ts index c3a7671c0..96f54f569 100644 --- a/spec/v1/providers/https.spec.ts +++ b/spec/v1/providers/https.spec.ts @@ -276,7 +276,7 @@ describe("callable CORS", () => { const response = await runHandler(func, req as any); expect(response.status).to.equal(200); - expect(response.body).to.be.deep.equal({ result: 42 }); + expect(response.body).to.be.deep.equal(JSON.stringify({ result: 42 })); expect(response.headers).to.deep.equal(expectedResponseHeaders); }); }); diff --git a/spec/v2/providers/https.spec.ts b/spec/v2/providers/https.spec.ts index 643044338..77d69bfcc 100644 --- a/spec/v2/providers/https.spec.ts +++ b/spec/v2/providers/https.spec.ts @@ -417,7 +417,7 @@ describe("onCall", () => { req.method = "POST"; const resp = await runHandler(func, req as any); - expect(resp.body).to.deep.equal({ result: 42 }); + expect(resp.body).to.deep.equal(JSON.stringify({ result: 42 })); }); it("should enforce CORS options", async () => { @@ -496,7 +496,7 @@ describe("onCall", () => { const response = await runHandler(func, req as any); expect(response.status).to.equal(200); - expect(response.body).to.be.deep.equal({ result: 42 }); + expect(response.body).to.be.deep.equal(JSON.stringify({ result: 42 })); expect(response.headers).to.deep.equal(expectedResponseHeaders); });