Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { readRepoFile } from "~/utils/testing/repoPaths";
|
||||
|
||||
const routePath = "apps/web/app/utils/data/.server/adminDashboardRouteData.ts";
|
||||
|
||||
function readRoute() {
|
||||
return readRepoFile(routePath);
|
||||
}
|
||||
|
||||
describe("admin dashboard KPI route contract", () => {
|
||||
it("passes the route translations and period filter to the dashboard stats service", () => {
|
||||
const source = readRoute();
|
||||
|
||||
expect(source).toContain('const { t } = await time(getTranslations(request), "getTranslations");');
|
||||
expect(source).toContain("getAdminDashboardStats({ t, gte: PeriodHelper.getGreaterThanOrEqualsFromRequest({ request }) })");
|
||||
expect(source).toContain("admin.dashboard.details.getAdminDashboardStats");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user