15 lines
574 B
TypeScript
15 lines
574 B
TypeScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
const source = fs.readFileSync(path.join(__dirname, "useAdminTenantData.ts"), "utf8");
|
|
|
|
describe("useAdminTenantData route contract", () => {
|
|
it("matches the canonical admin account detail route", () => {
|
|
expect(source).toContain('adminPath(`accounts/${id}`, { mode: "host-aware" })');
|
|
expect(source).not.toContain('adminPath(`tenant/${id}`');
|
|
});
|
|
});
|