chore: code formatting

This commit is contained in:
github-actions[bot]
2022-01-16 01:41:24 +00:00
parent 4fa62aad67
commit d3228a126a
94 changed files with 3875 additions and 3822 deletions

View File

@@ -1,23 +1,23 @@
/**Mocked data */
export default function({faker, query, login = faker.internet.userName()}) {
export default function({ faker, query, login = faker.internet.userName() }) {
console.debug("metrics/compute/mocks > mocking graphql api result > people/default")
const type = query.match(/(?<type>followers|following)[(]/)?.groups?.type ?? "(unknown type)"
return /after: "MOCKED_CURSOR"/m.test(query)
? ({
user:{
[type]:{
edges:[],
user: {
[type]: {
edges: [],
},
},
})
: ({
user:{
[type]:{
edges:new Array(Math.ceil(20 + 80 * Math.random())).fill(null).map((login = faker.internet.userName()) => ({
cursor:"MOCKED_CURSOR",
node:{
user: {
[type]: {
edges: new Array(Math.ceil(20 + 80 * Math.random())).fill(null).map((login = faker.internet.userName()) => ({
cursor: "MOCKED_CURSOR",
node: {
login,
avatarUrl:null,
avatarUrl: null,
},
})),
},