From 24b2036e097f8205f1ade70e5f03a4546f9832ef Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 3 Nov 2021 15:45:19 +0000 Subject: [PATCH] Fixing rest test mocking. --- packages/server/src/integrations/tests/rest.spec.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/tests/rest.spec.js b/packages/server/src/integrations/tests/rest.spec.js index cb69d3c38d..7b128a6d14 100644 --- a/packages/server/src/integrations/tests/rest.spec.js +++ b/packages/server/src/integrations/tests/rest.spec.js @@ -1,5 +1,11 @@ jest.mock("node-fetch", () => - jest.fn(() => ({ json: jest.fn(), text: jest.fn() })) + jest.fn(() => ({ + headers: { + get: () => ["application/json"] + }, + json: jest.fn(), + text: jest.fn() + })) ) const fetch = require("node-fetch") const RestIntegration = require("../rest")