Fixed weird floating footer behavior, updated Timeline to handle new growing scrolling content div, fixed grammar issue on chubby buttons, removed used nginx configs and Dockerfile comments, made Table not go full-w automatically, added tests to ensure no orphaned astro pages or site layout entries exist, dummy sitemap index so code analysis doesn't freak out
Some checks failed
Build and Test - Staging / test (pull_request) Failing after 3m28s
Build and Test - Staging / build_and_push (pull_request) Has been skipped
Build and Test - Staging / deploy_staging (pull_request) Has been skipped

This commit is contained in:
2025-11-11 15:16:15 -08:00
parent 85a86f3681
commit c9f921ba5b
17 changed files with 78 additions and 76 deletions

32
test/endpoints.spec.ts Normal file
View File

@@ -0,0 +1,32 @@
import {expect, test} from "vitest";
import {siteLayout, getPaths} from "@data/site-layout.ts";
// Paths that should be known to Astro statically
const astroStaticPaths = new Set(
Object.keys(import.meta.glob("/src/pages/**/*.astro"))
.map((path) =>
path
.replace("/src/pages", "")
.replace(/index\.astro$/, "")
.replace(/\.astro$|\.md$/, "")
.replace(/\/$/, "")
|| "/"
));
// Paths that exist in the site layout
const siteLayoutPaths = new Set([...getPaths(siteLayout), ...getPaths(siteLayout, [], true)]);
// Paths that exist in Astro's static paths, but not in site layout
const astroNotLayoutPaths = astroStaticPaths.difference(siteLayoutPaths);
// Paths that exist in site layout, but not in Astro's static paths
const siteLayoutNotAstroPaths = siteLayoutPaths.difference(astroStaticPaths);
test('Pages Missing from Site Layout', async () => {
expect(astroNotLayoutPaths).toHaveLength(0);
});
test('Pages Missing from Astro Paths', async () => {
expect(siteLayoutNotAstroPaths).toHaveLength(0);
});