1
0
mirror of https://github.com/badges/shields.git synced 2025-11-22 18:22:43 +03:00
Files
shields/services/github/github-directory-file-count.tester.js
2021-07-09 12:53:55 +01:00

30 lines
782 B
JavaScript

import { isMetric } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('directory file count').get('/badges/shields.json').expectBadge({
label: 'files',
message: isMetric,
})
t.create('directory file count (custom path)')
.get('/badges/shields/services.json')
.expectBadge({
label: 'files',
message: isMetric,
})
t.create('directory file count (directory not found)')
.get('/badges/shields/not_existing_directory.json')
.expectBadge({
label: 'files',
message: 'repo or directory not found',
})
t.create('directory file count (not a directory)')
.get('/badges/shields/package.json.json')
.expectBadge({
label: 'files',
message: 'not a directory',
})