fix [pypi] badges when package has null license (#7761)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,8 @@ const schema = Joi.object({
|
||||
info: Joi.object({
|
||||
version: Joi.string().required(),
|
||||
// https://github.com/badges/shields/issues/2022
|
||||
license: Joi.string().allow(''),
|
||||
// https://github.com/badges/shields/issues/7728
|
||||
license: Joi.string().allow('').allow(null),
|
||||
classifiers: Joi.array().items(Joi.string()).required(),
|
||||
}).required(),
|
||||
releases: Joi.object()
|
||||
|
||||
@@ -104,6 +104,12 @@ describe('PyPI helpers', function () {
|
||||
'MIT',
|
||||
])
|
||||
forCases([
|
||||
given({
|
||||
info: {
|
||||
license: null,
|
||||
classifiers: ['License :: OSI Approved :: MIT License'],
|
||||
},
|
||||
}),
|
||||
given({
|
||||
info: {
|
||||
license: '',
|
||||
|
||||
Reference in New Issue
Block a user