From e34c90b129ea4952a925715c95b4760ca4d6bd23 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Wed, 23 Aug 2023 22:59:52 -0400 Subject: [PATCH] fix(ci): octokit.request.defaults is not a function mocking was not keeping functions with extra properties --- tests/mocks/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mocks/index.mjs b/tests/mocks/index.mjs index 67e34b9a..67fc1bb3 100644 --- a/tests/mocks/index.mjs +++ b/tests/mocks/index.mjs @@ -70,7 +70,7 @@ export default async function({graphql, rest}) { for (const [key, value] of Object.entries(mocks)) { console.debug(`metrics/compute/mocks > mocking rest api > mocking ${path}.${key}`) if (typeof value === "function") { - unmocked[path] = value + unmocked[path] = Object.assign(value, mocked[key]) mocked[key] = new Proxy(unmocked[path], {apply: value.bind(null, {faker})}) } else {