Changes to endpoint unit tests for debugging
This commit is contained in:
@@ -17,16 +17,21 @@ const astroStaticPaths = new Set(
|
|||||||
// Paths that exist in the site layout
|
// Paths that exist in the site layout
|
||||||
const siteLayoutPaths = new Set([...getPaths(siteLayout), ...getPaths(siteLayout, [], true)]);
|
const siteLayoutPaths = new Set([...getPaths(siteLayout), ...getPaths(siteLayout, [], true)]);
|
||||||
|
|
||||||
// Paths that exist in Astro's static paths, but not in site layout
|
test('Astro Paths Not Empty', async () => {
|
||||||
const astroNotLayoutPaths = astroStaticPaths.difference(siteLayoutPaths);
|
expect(astroStaticPaths).not.toHaveLength(0);
|
||||||
|
});
|
||||||
|
|
||||||
// Paths that exist in site layout, but not in Astro's static paths
|
test('Site Layout Paths Not Empty', async () => {
|
||||||
const siteLayoutNotAstroPaths = siteLayoutPaths.difference(astroStaticPaths);
|
expect(siteLayoutPaths).not.toHaveLength(0);
|
||||||
|
});
|
||||||
|
|
||||||
test('Pages Missing from Site Layout', async () => {
|
test('Pages Missing from Site Layout', async () => {
|
||||||
|
const astroNotLayoutPaths = astroStaticPaths.difference(siteLayoutPaths);
|
||||||
|
|
||||||
expect(astroNotLayoutPaths).toHaveLength(0);
|
expect(astroNotLayoutPaths).toHaveLength(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Pages Missing from Astro Paths', async () => {
|
test('Pages Missing from Astro Paths', async () => {
|
||||||
|
const siteLayoutNotAstroPaths = siteLayoutPaths.difference(astroStaticPaths);
|
||||||
expect(siteLayoutNotAstroPaths).toHaveLength(0);
|
expect(siteLayoutNotAstroPaths).toHaveLength(0);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user