Fix unit tests for placeholder site-layout entries
This commit is contained in:
@@ -269,7 +269,10 @@ export const getPaths = (
|
|||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
let enabled = currentEntry.enabled ?? true;
|
let enabled = currentEntry.enabled ?? true;
|
||||||
if (disabledOnly ? !enabled : enabled) {
|
if (
|
||||||
|
(disabledOnly ? !enabled : enabled) &&
|
||||||
|
!currentEntry.placeholderEntry
|
||||||
|
) {
|
||||||
foundPaths.push("/" + [...paths, currentEntry.path || ""].join("/"));
|
foundPaths.push("/" + [...paths, currentEntry.path || ""].join("/"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,5 +40,8 @@ test("Pages Missing from Astro Paths", () => {
|
|||||||
siteLayoutPaths,
|
siteLayoutPaths,
|
||||||
astroStaticPaths,
|
astroStaticPaths,
|
||||||
);
|
);
|
||||||
expect(siteLayoutNotAstroPaths).toHaveLength(0);
|
expect(
|
||||||
|
siteLayoutNotAstroPaths,
|
||||||
|
`FOUND: ${[...siteLayoutNotAstroPaths]}`,
|
||||||
|
).toHaveLength(0);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user