feat: add start and end dates

This commit is contained in:
2026-02-19 15:20:25 -08:00
parent 9f0132db34
commit d4d5cfa532
41 changed files with 2854 additions and 140 deletions
+37
View File
@@ -0,0 +1,37 @@
/**
* @copyright NHCarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { Link } from "../src/lib/common.types";
describe("common Types", () => {
describe("link interface", () => {
it("should accept valid Link objects", () => {
const validLink: Link = {
title: "Example Website",
url: "https://example.com",
};
expect(validLink.title).toBe("Example Website");
expect(validLink.url).toBe("https://example.com");
});
it("should work with different URL formats", () => {
const links: Array<Link> = [
{ title: "HTTP URL", url: "http://example.com" },
{ title: "HTTPS URL", url: "https://example.com" },
{ title: "Relative URL", url: "/path/to/page" },
{ title: "URL with query", url: "https://example.com?query=value" },
{ title: "URL with anchor", url: "https://example.com#section" },
];
expect(links).toHaveLength(5);
for (const link of links) {
expect(link).toHaveProperty("title");
expect(link).toHaveProperty("url");
}
});
});
});