mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
additional tests
This commit is contained in:
parent
5e58efb07f
commit
9088d9fb9e
1 changed files with 18 additions and 0 deletions
|
@ -173,4 +173,22 @@ describe('getLockCategoriesByHash', () => {
|
|||
})
|
||||
.catch(() => ("couldn't call endpoint"));
|
||||
});
|
||||
|
||||
it('should return 400 if hash too short', (done: Done) => {
|
||||
fetch(getbaseURL() + '/api/lockCategories/00')
|
||||
.then(res => {
|
||||
assert.strictEqual(res.status, 400);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
|
||||
it('should return 400 if no hash specified', (done: Done) => {
|
||||
fetch(getbaseURL() + '/api/lockCategories/')
|
||||
.then(res => {
|
||||
assert.strictEqual(res.status, 400);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue