push
github
6292 of 6553 branches covered (96.02%)
47370 of 49926 relevant lines covered (94.88%)
116.99 hits per line
1 |
import { BaseJsonService } from '../index.js' |
|
2 |
|
3✔ |
3 |
const description = |
3✔ |
4 |
"You will need to create a <b>read-only</b> API token <a target='_blank' href='https://appcenter.ms/settings/apitokens'>here</a>."
|
3✔ |
5 |
|
3✔ |
6 |
class BaseVisualStudioAppCenterService extends BaseJsonService { |
3✔ |
7 |
async fetch({ |
|
8 |
owner, |
17✔ |
9 |
app, |
17✔ |
10 |
token, |
17✔ |
11 |
schema, |
17✔ |
12 |
url = `https://api.appcenter.ms/v0.1/apps/${owner}/${app}/releases/latest`, |
17✔ |
13 |
}) { |
17✔ |
14 |
return this._requestJson({ |
17✔ |
15 |
schema, |
17✔ |
16 |
options: {
|
17✔ |
17 |
headers: {
|
17✔ |
18 |
'X-API-Token': token,
|
17✔ |
19 |
}, |
17✔ |
20 |
}, |
17✔ |
21 |
httpErrors: {
|
17✔ |
22 |
401: 'invalid token', |
17✔ |
23 |
403: 'project not found', |
× |
24 |
404: 'project not found', |
17✔ |
25 |
}, |
17✔ |
26 |
url, |
17✔ |
27 |
}) |
17✔ |
28 |
} |
17✔ |
29 |
} |
3✔ |
30 |
|
3✔ |
31 |
export { description, BaseVisualStudioAppCenterService }
|
3✔ |