1
0
mirror of https://github.com/badges/shields.git synced 2025-04-18 19:44:04 +03:00
shields/services/github/github-workflow-status.tester.js
chris48s 61dd6c0443
switch from github workflows to github actions workflows; test [githubactionsworkflowstatus githubworkflowstatus] (#8475)
* switch from github workflows to github actions workflows

* update github actions workflow badge to use api

* add test case for missing branch param

* custom deprecation message
2022-12-15 18:36:17 +00:00

43 lines
1.3 KiB
JavaScript

import { ServiceTester } from '../tester.js'
export const t = new ServiceTester({
id: 'GithubWorkflowStatus',
title: 'Github Workflow Status',
pathPrefix: '/github/workflow/status',
})
t.create('no longer available (previously nonexistent repo)')
.get('/badges/shields-fakeness/fake.json')
.expectBadge({
label: 'build',
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('no longer available (previously nonexistent workflow)')
.get('/actions/toolkit/not-a-real-workflow.json')
.expectBadge({
label: 'build',
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('no longer available (previously valid workflow)')
.get('/actions/toolkit/toolkit-unit-tests.json')
.expectBadge({
label: 'build',
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('no longer available (previously valid workflow - branch)')
.get('/actions/toolkit/toolkit-unit-tests/master.json')
.expectBadge({
label: 'build',
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('no longer available (previously valid workflow - event)')
.get('/actions/toolkit/toolkit-unit-tests.json?event=push')
.expectBadge({
label: 'build',
message: 'https://github.com/badges/shields/issues/8671',
})