ref(plugins/languages): indepth mode (#1118)
This commit is contained in:
30
tests/mocks/api/github/rest/repos/get.mjs
Normal file
30
tests/mocks/api/github/rest/repos/get.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
/**Mocked data */
|
||||
export default async function({faker}, target, that, [{owner, repo}]) {
|
||||
console.debug("metrics/compute/mocks > mocking rest api result > rest.repos.get")
|
||||
return ({
|
||||
status: 200,
|
||||
url: `https://api.github.com/repos/${owner}/${repo}`,
|
||||
headers: {
|
||||
server: "GitHub.com",
|
||||
status: "200 OK",
|
||||
"x-oauth-scopes": "repo",
|
||||
},
|
||||
data: {
|
||||
id: faker.datatype.number(100000),
|
||||
name: repo,
|
||||
full_name: `${owner}/${repo}`,
|
||||
private: false,
|
||||
owner: {
|
||||
login: owner,
|
||||
id: faker.datatype.number(100000),
|
||||
},
|
||||
description: faker.lorem.sentences(),
|
||||
created_at: faker.date.past(),
|
||||
license: {
|
||||
key: "mit",
|
||||
name: "MIT License",
|
||||
},
|
||||
default_branch: "main",
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -52,6 +52,7 @@ export default async function({faker}, target, that, args) {
|
||||
patch: '@@ -0,0 +1,5 @@\n+//Imports\n+ import app from "./src/app.mjs"\n+\n+//Start app\n+ await app()\n\\ No newline at end of file',
|
||||
},
|
||||
],
|
||||
parents: []
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user