portfolio/test/config/NavItems.spec.ts
Naomi Carrigan c93839cb03
Some checks failed
Node.js CI / Lint and Test (pull_request) Failing after 1m2s
chore: clean up a bunch of stuff that moved to static pages
Also separate the landing page into two different things for
  me and my org.
2025-02-20 17:56:42 -08:00

25 lines
671 B
TypeScript

/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { describe, it, expect } from "vitest";
import { NaomiNavItems, NavItems } from "../../src/config/NavItems";
describe("nav items", () => {
it("should be unique", () => {
expect.assertions(2);
const concat = [ ...NavItems, ...NaomiNavItems ];
const href = new Set(
concat.map((n) => {
return n.href;
}),
);
const text = new Set(concat.map((n) => {
return n.text;
}));
expect(href, "links are not unique").toHaveLength(concat.length);
expect(text, "names are not unique").toHaveLength(concat.length);
});
});