implement CalDAV MCP server v1 with streamable HTTP tools
This commit is contained in:
14
tests/util.test.ts
Normal file
14
tests/util.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { normalizeHref } from "../src/util.js";
|
||||
|
||||
describe("normalizeHref", () => {
|
||||
it("resolves relative href against base", () => {
|
||||
const href = normalizeHref("/caldav/user/Calendar/personal/", "https://caldav.example.com/caldav");
|
||||
expect(href).toBe("https://caldav.example.com/caldav/user/Calendar/personal/");
|
||||
});
|
||||
|
||||
it("strips URL fragment", () => {
|
||||
const href = normalizeHref("https://caldav.example.com/caldav/user/Calendar/personal/#fragment", "https://caldav.example.com/caldav");
|
||||
expect(href).toBe("https://caldav.example.com/caldav/user/Calendar/personal/");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user