Files
shields/services/crates/crates-license.tester.js
chris48s b71f812b68 migrate examples to openApi part 17; affects [buildkite cii codeship crates jsdelivr npms] and bundlephobia (#9584)
* update crates service test

* migrate some services from examples to openApi

* migrate crates from examples to openApi, improve titles

* explain what hd,hw,hm,hy actually mean

* improve descriptions
2023-12-22 13:25:38 +00:00

24 lines
794 B
JavaScript

import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('license')
.get('/libc.json')
.expectBadge({ label: 'license', message: 'MIT OR Apache-2.0' })
t.create('license (with version)')
.get('/libc/0.2.44.json')
.expectBadge({ label: 'license', message: 'MIT OR Apache-2.0' })
t.create('license (not found)')
.get('/not-a-real-package.json')
.expectBadge({ label: 'license', message: 'not found' })
// https://github.com/badges/shields/issues/7073
t.create('license (null licenses in history)')
.get('/stun.json')
.expectBadge({ label: 'license', message: 'MIT OR Apache-2.0' })
t.create('license (version with null license)')
.get('/stun/0.0.1.json')
.expectBadge({ label: 'license', message: 'invalid null license' })