mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
17 lines
No EOL
550 B
TypeScript
17 lines
No EOL
550 B
TypeScript
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 ?? true);
|
|
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);
|
|
});
|
|
}); |