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:
@@ -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)')
|
||||
|
||||
Reference in New Issue
Block a user