portfolio/test/config/Projects.spec.ts

30 lines
697 B
TypeScript
Raw Normal View History

/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { describe, it, expect } from "vitest";
import { Projects } from "../../src/config/Projects";
describe("project objects", () => {
it("should have unique names", () => {
expect.assertions(1);
const set = new Set(
Projects.map((a) => {
return a.name;
}),
);
expect(set, "are not unique").toHaveLength(Projects.length);
});
it("should have unique URLs", () => {
expect.assertions(1);
const set = new Set(
Projects.map((a) => {
return a.url;
}),
);
expect(set, "are not unique").toHaveLength(Projects.length);
});
});