Skip to content

Commit

Permalink
badges#745 | badges#937 : create github service-test
Browse files Browse the repository at this point in the history
Add file size test
  • Loading branch information
webcaetano committed Apr 29, 2017
1 parent 3405f37 commit 3ed09b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions service-tests/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ t.create('downloads for specific asset with slash')
t.create('downloads for unknown release')
.get('/downloads/atom/atom/does-not-exist/total.json')
.expectJSON({ name: 'downloads', value: 'none' });

t.create('File size')
.get('/size/webcaetano/craft/build/craft.min.js.json')
.expectJSONTypes(Joi.object().keys({
name: Joi.equal('size'),
value: Joi.string().regex(/^[0-9]*[.]?[0-9]+\s(B|kB|MB|GB|TB|PB|EB|ZB|YB)$/)
}));

0 comments on commit 3ed09b1

Please sign in to comment.