add additional/missing tests

This commit is contained in:
Michael C
2022-09-20 23:22:21 -04:00
parent f5bafa2868
commit 3f470a72f5
7 changed files with 271 additions and 7 deletions

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