From dac9e80efda35d49cd6ca9c9c8ff4c8a380d8d10 Mon Sep 17 00:00:00 2001 From: Corwin Perren Date: Fri, 12 Dec 2025 23:05:47 -0800 Subject: [PATCH] Fix unit tests for placeholder site-layout entries --- src/data/site-layout.ts | 5 ++++- test/endpoints.spec.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/data/site-layout.ts b/src/data/site-layout.ts index 44ad9de..e755e87 100644 --- a/src/data/site-layout.ts +++ b/src/data/site-layout.ts @@ -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("/")); } } diff --git a/test/endpoints.spec.ts b/test/endpoints.spec.ts index 5e4fd72..11f85f5 100644 --- a/test/endpoints.spec.ts +++ b/test/endpoints.spec.ts @@ -40,5 +40,8 @@ test("Pages Missing from Astro Paths", () => { siteLayoutPaths, astroStaticPaths, ); - expect(siteLayoutNotAstroPaths).toHaveLength(0); + expect( + siteLayoutNotAstroPaths, + `FOUND: ${[...siteLayoutNotAstroPaths]}`, + ).toHaveLength(0); });