SponsorBlockServer/test/cases/getTotalStats.ts

17 lines
550 B
TypeScript
Raw Normal View History

2022-09-21 05:22:21 +02:00
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;
2022-09-25 05:08:36 +02:00
assert.ok(data?.userCount ?? true);
2022-09-21 05:22:21 +02:00
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);
});
});