fix layout SSR translations and remediation follow-ups
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { afterAll, describe, expect, test } from "bun:test";
|
||||
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { getAuthzCatalog, hasAuthzCatalog } from "@wrnexus/authz";
|
||||
import { startServer } from "../src/index.ts";
|
||||
@@ -63,9 +63,14 @@ export default defineAuthz({ permissions: { "post:read": { title: "View posts" }
|
||||
try {
|
||||
expect(hasAuthzCatalog()).toBe(true);
|
||||
expect(getAuthzCatalog().permissions.has("post:read")).toBe(true);
|
||||
const cacheDir = join(appDir, "..", `.wrnexus-${process.pid}`);
|
||||
mkdirSync(cacheDir, { recursive: true });
|
||||
writeFileSync(join(cacheDir, "generated.js"), "generated", "utf8");
|
||||
expect(existsSync(cacheDir)).toBe(true);
|
||||
} finally {
|
||||
server.stop();
|
||||
}
|
||||
expect(existsSync(join(appDir, "..", `.wrnexus-${process.pid}`))).toBe(false);
|
||||
});
|
||||
|
||||
test("an app with no app/authz declarations boots without throwing", async () => {
|
||||
|
||||
Reference in New Issue
Block a user