1
0
mirror of https://github.com/badges/shields.git synced 2025-11-22 18:22:43 +03:00

Use GraphQL to fix GitHub file count badges [github] (#8112)

* fix: Use graphQL for github file count badges

* Add test for repo not found and update transform tests

* Fix extensions in transform test

* Mark type and extension as required

* Simpler type transform since only file, dir supported
This commit is contained in:
Jonah Lawrence
2022-06-22 11:57:56 -06:00
committed by GitHub
parent 347e3839b8
commit e7aecb1a3b
3 changed files with 62 additions and 32 deletions

View File

@@ -14,11 +14,18 @@ t.create('directory file count (custom path)')
message: isMetric,
})
t.create('directory file count (repo not found)')
.get('/badges/not_existing_repository.json')
.expectBadge({
label: 'files',
message: 'repo not found',
})
t.create('directory file count (directory not found)')
.get('/badges/shields/not_existing_directory.json')
.expectBadge({
label: 'files',
message: 'repo or directory not found',
message: 'directory not found',
})
t.create('directory file count (not a directory)')