conductor(checkpoint): Checkpoint end of Phase 2: Core Logic

This commit is contained in:
2026-02-19 07:00:01 -08:00
parent 85691d1df5
commit 10a6db5893
2 changed files with 113 additions and 44 deletions

45
icalendar_test.ts Normal file
View File

@@ -0,0 +1,45 @@
import { assertEquals } from "jsr:@std/assert";
import { resolveEventStart } from "./icalendar.ts";
Deno.test("resolveEventStart - local date with timezone", async () => {
const icsEvent = {
summary: "Test Event",
start: {
date: "2025-01-15T12:00:00.000",
local: {
date: "2025-01-15T07:00:00.000",
timezone: "Eastern Standard Time"
}
}
};
const result = await resolveEventStart(icsEvent);
assertEquals(result?.toISOString(), "2025-01-15T12:00:00.000Z");
});
Deno.test("resolveEventStart - DST check (Summer)", async () => {
const icsEvent = {
summary: "Test Event DST",
start: {
date: "2025-07-15T11:00:00.000",
local: {
date: "2025-07-15T07:00:00.000",
timezone: "Eastern Standard Time"
}
}
};
const result = await resolveEventStart(icsEvent);
assertEquals(result?.toISOString(), "2025-07-15T11:00:00.000Z");
});
Deno.test("resolveEventStart - UTC event", async () => {
const icsEvent = {
summary: "UTC Event",
start: {
date: "2025-01-15T12:00:00.000Z"
}
};
const result = await resolveEventStart(icsEvent);
assertEquals(result?.toISOString(), "2025-01-15T12:00:00.000Z");
});