test:add logging to ensure DTSTAMP is correctly added to the new event

This commit is contained in:
Ryan Mwangi 2024-11-12 22:47:13 +03:00
parent 665c134597
commit e8582cd411
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,8 @@ export function addEventsToCalendar(calendarComponent, results) {
component.getAllSubcomponents('vevent').forEach((event) => { component.getAllSubcomponents('vevent').forEach((event) => {
const vevent = new ICAL.Event(event); const vevent = new ICAL.Event(event);
console.log('Original event properties:', event.getAllProperties());
console.log('Original vevent properties:', vevent);
const newEvent = new ICAL.Component('vevent'); const newEvent = new ICAL.Component('vevent');
// Use ICAL.Time to handle dates correctly // Use ICAL.Time to handle dates correctly
@ -78,6 +80,7 @@ export function addEventsToCalendar(calendarComponent, results) {
// Add the new event to the calendar component // Add the new event to the calendar component
calendarComponent.addSubcomponent(newEvent); calendarComponent.addSubcomponent(newEvent);
console.log('New event properties:', newEvent);
}); });
// Log the added events for debugging // Log the added events for debugging