mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 05:27:00 +03:00
add 4xx tests
This commit is contained in:
@@ -38,6 +38,15 @@ describe("getTopUsers", () => {
|
||||
.catch(err => done(err));
|
||||
});
|
||||
|
||||
it("Should return 400 if undefined sortType provided", (done) => {
|
||||
client.get(endpoint)
|
||||
.then(res => {
|
||||
assert.strictEqual(res.status, 400);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
|
||||
it("Should be able to get by all sortTypes", (done) => {
|
||||
client.get(endpoint, { params: { sortType: 0 } })// minutesSaved
|
||||
.then(res => {
|
||||
|
||||
Reference in New Issue
Block a user