mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-02-01 07:10:55 +03:00
add additional/missing tests
This commit is contained in:
17
test/cases/getTotalStats.ts
Normal file
17
test/cases/getTotalStats.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import assert from "assert";
|
||||
import { client } from "../utils/httpClient";
|
||||
|
||||
const endpoint = "/api/getTotalStats";
|
||||
|
||||
describe("getTotalStats", () => {
|
||||
it("Can get total stats", async () => {
|
||||
const result = await client({ url: endpoint });
|
||||
const data = result.data;
|
||||
assert.ok(data.userCount >= 0);
|
||||
assert.ok(data.activeUsers >= 0);
|
||||
assert.ok(data.apiUsers >= 0);
|
||||
assert.ok(data.viewCount >= 0);
|
||||
assert.ok(data.totalSubmissions >= 0);
|
||||
assert.ok(data.minutesSaved >= 0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user