mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 13:07:02 +03:00
add more tests for coverage
This commit is contained in:
@@ -81,4 +81,14 @@ describe("getTopUsers", () => {
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
|
||||
it("Should be able to get cached result", (done) => {
|
||||
client.get(endpoint, { params: { sortType: 0 } })// minutesSaved
|
||||
.then(res => {
|
||||
assert.strictEqual(res.status, 200);
|
||||
assert.ok(res.data.userNames.indexOf(user1) < res.data.userNames.indexOf(user2), `Actual Order: ${res.data.userNames}`);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user