import { existsSync, readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; import path from "node:path"; import { describe, expect, it } from "vitest"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const publicRoutesDirectory = __dirname; const noCodeViewsSource = readFileSync(path.resolve(__dirname, "../../utils/helpers/NoCodeViewsHelper.tsx"), "utf8"); describe("public route boundary", () => { it("keeps legacy unauthenticated row sharing out of the core runtime", () => { expect(existsSync(`${publicRoutesDirectory}/$entity.$id.tsx`)).toBe(false); expect(noCodeViewsSource).not.toContain("Public URL"); expect(noCodeViewsSource).not.toContain("`/public/${entity.slug}/${rows[0].id}`"); }); });