Files
astro-website/site/tests/blog-nav.test.ts
Santhosh Janardhanan c773affbc8
Some checks failed
ci / site (push) Has been cancelled
Wordpress is in
2026-02-10 01:04:12 -05:00

19 lines
622 B
TypeScript

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"/);
});
});