fix: resolve merge conflict and format code

This commit is contained in:
lenhanphung
2025-09-18 15:54:16 +07:00
parent 7d46aef1fa
commit b049158c4e
+72 -38
View File
@@ -488,12 +488,16 @@ describe("calendarEventToJCal", () => {
// Should use UTC timezone as fallback - check for UTC standard timezone // Should use UTC timezone as fallback - check for UTC standard timezone
expect(vtimezone[2]).toEqual( expect(vtimezone[2]).toEqual(
expect.arrayContaining([ expect.arrayContaining([
["standard", [ [
["tzoffsetfrom", {}, "utc-offset", "+00:00"], "standard",
["tzoffsetto", {}, "utc-offset", "+00:00"], [
["tzname", {}, "text", "UTC"], ["tzoffsetfrom", {}, "utc-offset", "+00:00"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"] ["tzoffsetto", {}, "utc-offset", "+00:00"],
], []] ["tzname", {}, "text", "UTC"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"],
],
[],
],
]) ])
); );
}); });
@@ -519,12 +523,16 @@ describe("calendarEventToJCal", () => {
// Should use UTC timezone as fallback // Should use UTC timezone as fallback
expect(vtimezone[2]).toEqual( expect(vtimezone[2]).toEqual(
expect.arrayContaining([ expect.arrayContaining([
["standard", [ [
["tzoffsetfrom", {}, "utc-offset", "+00:00"], "standard",
["tzoffsetto", {}, "utc-offset", "+00:00"], [
["tzname", {}, "text", "UTC"], ["tzoffsetfrom", {}, "utc-offset", "+00:00"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"] ["tzoffsetto", {}, "utc-offset", "+00:00"],
], []] ["tzname", {}, "text", "UTC"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"],
],
[],
],
]) ])
); );
}); });
@@ -550,12 +558,16 @@ describe("calendarEventToJCal", () => {
// Should use UTC timezone as fallback // Should use UTC timezone as fallback
expect(vtimezone[2]).toEqual( expect(vtimezone[2]).toEqual(
expect.arrayContaining([ expect.arrayContaining([
["standard", [ [
["tzoffsetfrom", {}, "utc-offset", "+00:00"], "standard",
["tzoffsetto", {}, "utc-offset", "+00:00"], [
["tzname", {}, "text", "UTC"], ["tzoffsetfrom", {}, "utc-offset", "+00:00"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"] ["tzoffsetto", {}, "utc-offset", "+00:00"],
], []] ["tzname", {}, "text", "UTC"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"],
],
[],
],
]) ])
); );
}); });
@@ -581,12 +593,16 @@ describe("calendarEventToJCal", () => {
// Should use UTC timezone as fallback // Should use UTC timezone as fallback
expect(vtimezone[2]).toEqual( expect(vtimezone[2]).toEqual(
expect.arrayContaining([ expect.arrayContaining([
["standard", [ [
["tzoffsetfrom", {}, "utc-offset", "+00:00"], "standard",
["tzoffsetto", {}, "utc-offset", "+00:00"], [
["tzname", {}, "text", "UTC"], ["tzoffsetfrom", {}, "utc-offset", "+00:00"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"] ["tzoffsetto", {}, "utc-offset", "+00:00"],
], []] ["tzname", {}, "text", "UTC"],
["dtstart", {}, "date-time", "1970-01-01T00:00:00"],
],
[],
],
]) ])
); );
}); });
@@ -612,20 +628,38 @@ describe("calendarEventToJCal", () => {
// Should use the specified timezone - check for Europe/Paris timezone components // Should use the specified timezone - check for Europe/Paris timezone components
expect(vtimezone[2]).toEqual( expect(vtimezone[2]).toEqual(
expect.arrayContaining([ expect.arrayContaining([
["daylight", [ [
["tzoffsetfrom", {}, "utc-offset", "+01:00"], "daylight",
["tzoffsetto", {}, "utc-offset", "+02:00"], [
["tzname", {}, "text", "CEST"], ["tzoffsetfrom", {}, "utc-offset", "+01:00"],
["dtstart", {}, "date-time", "1970-03-29T02:00:00"], ["tzoffsetto", {}, "utc-offset", "+02:00"],
["rrule", {}, "recur", { byday: "-1SU", bymonth: 3, freq: "YEARLY" }] ["tzname", {}, "text", "CEST"],
], []], ["dtstart", {}, "date-time", "1970-03-29T02:00:00"],
["standard", [ [
["tzoffsetfrom", {}, "utc-offset", "+02:00"], "rrule",
["tzoffsetto", {}, "utc-offset", "+01:00"], {},
["tzname", {}, "text", "CET"], "recur",
["dtstart", {}, "date-time", "1970-10-25T03:00:00"], { byday: "-1SU", bymonth: 3, freq: "YEARLY" },
["rrule", {}, "recur", { byday: "-1SU", bymonth: 10, freq: "YEARLY" }] ],
], []] ],
[],
],
[
"standard",
[
["tzoffsetfrom", {}, "utc-offset", "+02:00"],
["tzoffsetto", {}, "utc-offset", "+01:00"],
["tzname", {}, "text", "CET"],
["dtstart", {}, "date-time", "1970-10-25T03:00:00"],
[
"rrule",
{},
"recur",
{ byday: "-1SU", bymonth: 10, freq: "YEARLY" },
],
],
[],
],
]) ])
); );
}); });