SponsorBlockServer/test/cases/getTotalStats.ts
2022-09-24 23:08:36 -04:00

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);
});
});