Improve mocking and debugging with web instance (#91)

This commit is contained in:
Simon Lecoq
2021-02-02 14:05:01 +01:00
committed by GitHub
parent 30956be7b0
commit b8182c4eb5
12 changed files with 40 additions and 36 deletions

View File

@@ -0,0 +1,23 @@
/** Mocked data */
export default function({faker}, target, that, args) {
return ({
status:200,
url:"https://api.github.com/rate_limit",
headers:{
server:"GitHub.com",
status:"200 OK",
"x-oauth-scopes":"repo",
},
data:{
resources:{
core:{limit:5000, used:0, remaining:5000, reset:0},
search:{limit:30, used:0, remaining:30, reset:0},
graphql:{limit:5000, used:0, remaining:5000, reset:0},
integration_manifest:{limit:5000, used:0, remaining:5000, reset:0},
source_import:{limit:100, used:0, remaining:100, reset:0},
code_scanning_upload:{limit:500, used:0, remaining:500, reset:0},
},
rate:{limit:5000, used:0, remaining:"MOCKED", reset:0}
}
})
}