fix(ci): octokit.request.defaults is not a function
mocking was not keeping functions with extra properties
This commit is contained in:
@@ -70,7 +70,7 @@ export default async function({graphql, rest}) {
|
|||||||
for (const [key, value] of Object.entries(mocks)) {
|
for (const [key, value] of Object.entries(mocks)) {
|
||||||
console.debug(`metrics/compute/mocks > mocking rest api > mocking ${path}.${key}`)
|
console.debug(`metrics/compute/mocks > mocking rest api > mocking ${path}.${key}`)
|
||||||
if (typeof value === "function") {
|
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})})
|
mocked[key] = new Proxy(unmocked[path], {apply: value.bind(null, {faker})})
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user