fix(dev): consolidate generated cache directories
This commit is contained in:
@@ -63,14 +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}`);
|
||||
const cacheDir = join(appDir, "..", ".wrnexus", "cache");
|
||||
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);
|
||||
expect(existsSync(join(appDir, "..", ".wrnexus", "cache"))).toBe(false);
|
||||
});
|
||||
|
||||
test("an app with no app/authz declarations boots without throwing", async () => {
|
||||
|
||||
@@ -18,7 +18,7 @@ test("per-process dev caches are excluded from root and example project tools",
|
||||
const projects = ["basic-app", "inter-app-api-showcase"].map((name) =>
|
||||
join(root, "examples", name),
|
||||
);
|
||||
const caches = projects.map((project) => join(project, ".wrnexus-123"));
|
||||
const caches = projects.map((project) => join(project, ".wrnexus", "cache"));
|
||||
|
||||
for (const project of projects) {
|
||||
const projectEslint = readFileSync(join(project, "eslint.config.js"), "utf8");
|
||||
|
||||
Reference in New Issue
Block a user