Add linter and minor bug fixes (#107)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/** Mocked data */
|
||||
export default function ({faker, query, login = faker.internet.userName()}) {
|
||||
console.debug(`metrics/compute/mocks > mocking graphql api result > People`)
|
||||
/**Mocked data */
|
||||
export default function({faker, query, login = faker.internet.userName()}) {
|
||||
console.debug("metrics/compute/mocks > mocking graphql api result > People")
|
||||
const type = query.match(/(?<type>sponsorshipsAsSponsor|sponsorshipsAsMaintainer)[(]/)?.groups?.type ?? "(unknown type)"
|
||||
return /after: "MOCKED_CURSOR"/m.test(query) ? ({
|
||||
user:{
|
||||
login,
|
||||
[type]:{
|
||||
edges:[]
|
||||
}
|
||||
}
|
||||
edges:[],
|
||||
},
|
||||
},
|
||||
}) : ({
|
||||
user:{
|
||||
login,
|
||||
@@ -23,10 +23,10 @@
|
||||
sponsorable:{
|
||||
login:faker.internet.userName(),
|
||||
avatarUrl:null,
|
||||
}
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user