Fix unit tests for placeholder site-layout entries
All checks were successful
Build and Test - Staging / test (pull_request) Successful in 5m26s
Build and Test - Staging / build_and_push (pull_request) Successful in 4m16s
Build and Test - Staging / deploy_staging (pull_request) Successful in 3s

This commit is contained in:
2025-12-12 23:05:47 -08:00
parent 8fd744118f
commit dac9e80efd
2 changed files with 8 additions and 2 deletions

View File

@@ -269,7 +269,10 @@ export const getPaths = (
];
} else {
let enabled = currentEntry.enabled ?? true;
if (disabledOnly ? !enabled : enabled) {
if (
(disabledOnly ? !enabled : enabled) &&
!currentEntry.placeholderEntry
) {
foundPaths.push("/" + [...paths, currentEntry.path || ""].join("/"));
}
}

View File

@@ -40,5 +40,8 @@ test("Pages Missing from Astro Paths", () => {
siteLayoutPaths,
astroStaticPaths,
);
expect(siteLayoutNotAstroPaths).toHaveLength(0);
expect(
siteLayoutNotAstroPaths,
`FOUND: ${[...siteLayoutNotAstroPaths]}`,
).toHaveLength(0);
});