Code formatting (#280)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
/**Mocked data */
|
||||
export default function({faker, query, login = faker.internet.userName()}) {
|
||||
console.debug("metrics/compute/mocks > mocking graphql api result > people/repository")
|
||||
const type = query.match(/(?<type>stargazers|watchers)[(]/)?.groups?.type ?? "(unknown type)"
|
||||
return /after: "MOCKED_CURSOR"/m.test(query) ? ({
|
||||
export default function({faker, query, login = faker.internet.userName()}) {
|
||||
console.debug("metrics/compute/mocks > mocking graphql api result > people/repository")
|
||||
const type = query.match(/(?<type>stargazers|watchers)[(]/)?.groups?.type ?? "(unknown type)"
|
||||
return /after: "MOCKED_CURSOR"/m.test(query)
|
||||
? ({
|
||||
user:{
|
||||
repository:{
|
||||
[type]:{
|
||||
@@ -10,11 +11,12 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
}) : ({
|
||||
})
|
||||
: ({
|
||||
user:{
|
||||
repository:{
|
||||
[type]:{
|
||||
edges:new Array(Math.ceil(20+80*Math.random())).fill(null).map((login = faker.internet.userName()) => ({
|
||||
edges:new Array(Math.ceil(20 + 80 * Math.random())).fill(null).map((login = faker.internet.userName()) => ({
|
||||
cursor:"MOCKED_CURSOR",
|
||||
node:{
|
||||
login,
|
||||
@@ -25,4 +27,4 @@
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user