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
+22
@@ -0,0 +1,22 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
function readRouteSource(path: string) {
|
||||
return readFileSync(new URL(path, import.meta.url), "utf8");
|
||||
}
|
||||
|
||||
describe("entity group route slug boundary", () => {
|
||||
it("rejects reserved tenant child route slugs before creating groups", () => {
|
||||
const source = readRouteSource("new.tsx");
|
||||
|
||||
expect(source).toContain("isReservedTenantChildRouteSlug(slug)");
|
||||
expect(source.indexOf("isReservedTenantChildRouteSlug(slug)")).toBeLessThan(source.indexOf("await createEntityGroup"));
|
||||
});
|
||||
|
||||
it("rejects reserved tenant child route slugs before updating groups", () => {
|
||||
const source = readRouteSource("$id.tsx");
|
||||
|
||||
expect(source).toContain("isReservedTenantChildRouteSlug(slug)");
|
||||
expect(source.indexOf("isReservedTenantChildRouteSlug(slug)")).toBeLessThan(source.indexOf("await updateEntityGroup"));
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user