mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
reverted test to 404
This commit is contained in:
parent
62916f6a7e
commit
b244b1e1ad
1 changed files with 3 additions and 4 deletions
|
@ -40,16 +40,15 @@ describe('getSegmentsByHash', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('Should be able to get an emptry array if no videos', (done) => {
|
||||
it('Should be able to get an empty array if no videos', (done) => {
|
||||
request.get(utils.getbaseURL()
|
||||
+ '/api/skipSegments/11111?categories=["shilling"]', null,
|
||||
(err, res, body) => {
|
||||
if (err) done("Couldn't call endpoint");
|
||||
else if (res.statusCode !== 200) done("non 200 status code, was " + res.statusCode);
|
||||
else if (res.statusCode !== 404) done("non 404 status code, was " + res.statusCode);
|
||||
else {
|
||||
if (JSON.parse(body).length === 0) done(); // pass
|
||||
if (JSON.parse(body).length === 0 && body === '[]') done(); // pass
|
||||
else done("non empty array returned");
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue