import { readFile } from "node:fs/promises"; import path from "node:path"; import { describe, expect, it } from "vitest"; describe("blog navigation", () => { it("includes Blog link in header between Podcast and About", async () => { const layoutPath = path.join(process.cwd(), "src", "layouts", "BaseLayout.astro"); const src = await readFile(layoutPath, "utf8"); // Order check: /podcast -> /blog -> /about expect(src).toMatch(/href="\/podcast"[\s\S]*href="\/blog"[\s\S]*href="\/about"/); // Tracking ID should exist expect(src).toMatch(/data-umami-event-target_id="nav\.blog"/); }); });