15 lines
533 B
JavaScript
15 lines
533 B
JavaScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { fileURLToPath } from "node:url";
|
|
import { dirname, join } from "node:path";
|
|
|
|
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
|
test("the site has a home page with a semantic navigation bar", () => {
|
|
const html = readFileSync(join(root, "index.html"), "utf8");
|
|
assert.match(html, /<nav/);
|
|
assert.match(html, /class="nav-links"/);
|
|
assert.match(html, /<a href="index\.html">Home<\/a>/);
|
|
});
|