fix(tests): make mocks for rest octokit async

This commit is contained in:
lowlighter committed 2022-04-23 16:31:22 -04:00
1 parent 0d25379ff4
commit e9f9bcc678
12 files changed
+13 -13

No files matched your search

@@ -1,5 +1,5 @@
/**Mocked data */
export default function({ faker }, target, that, [{ owner, repo }]) {
export default async function({ faker }, target, that, [{ owner, repo }]) {
console.debug("metrics/compute/mocks > mocking rest api result > rest.repos.getContributorsStats")
return ({
status: 200,
@@ -1,5 +1,5 @@
/**Mocked data */
export default function({ faker }, target, that, [{ owner, repo }]) {
export default async function({ faker }, target, that, [{ owner, repo }]) {
console.debug("metrics/compute/mocks > mocking rest api result > rest.repos.getViews")
const count = faker.datatype.number(10000) * 2
const uniques = faker.datatype.number(count) * 2
@@ -1,5 +1,5 @@
/**Mocked data */
export default function({ faker }, target, that, [{ page, per_page, owner, repo }]) {
export default async function({ faker }, target, that, [{ page, per_page, owner, repo }]) {
console.debug("metrics/compute/mocks > mocking rest api result > rest.repos.listCommits")
return ({
status: 200,
@@ -1,5 +1,5 @@
/**Mocked data */
export default function({ faker }, target, that, [{ owner, repo }]) {
export default async function({ faker }, target, that, [{ owner, repo }]) {
console.debug("metrics/compute/mocks > mocking rest api result > rest.repos.listContributors")
return ({
status: 200,