test(caldav): add test suite for CalDAV multi-account sync

Add comprehensive test coverage for CalDAV multi-account functionality:
- Schema validation for caldav_accounts and caldav_calendar_selection tables
- UNIQUE constraint enforcement on account credentials
- Foreign key CASCADE delete behavior
- Calendar selection enable/disable filtering
- Target calendar columns in calendar_events table

All 7 tests pass using Node.js in-memory SQLite.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ulas Kalayci
2026-05-04 08:44:06 +02:00
parent 3c9b2840e7
commit 4bca84a609
2 changed files with 158 additions and 1 deletions
+2 -1
View File
@@ -27,7 +27,8 @@
"test:ics-parser": "node test-ics-parser.js",
"test:ics-sub": "node --experimental-sqlite test-ics-subscription.js",
"test:backup-scheduler": "node --experimental-sqlite test-backup-scheduler.js",
"test": "node --experimental-sqlite test-db.js && node --experimental-sqlite test-dashboard.js && node --experimental-sqlite test-tasks.js && node --experimental-sqlite test-shopping.js && node --experimental-sqlite test-meals.js && node --experimental-sqlite test-calendar.js && node --experimental-sqlite test-notes-contacts-budget.js && npm run test:ux-utils && npm run test:modal-utils && npm run test:reminders && npm run test:api && npm run test:ics-parser && npm run test:ics-sub && npm run test:setup && npm run test:kitchen-tabs && npm run test:backup-scheduler"
"test:caldav": "node --experimental-sqlite test-caldav-sync.js",
"test": "node --experimental-sqlite test-db.js && node --experimental-sqlite test-dashboard.js && node --experimental-sqlite test-tasks.js && node --experimental-sqlite test-shopping.js && node --experimental-sqlite test-meals.js && node --experimental-sqlite test-calendar.js && node --experimental-sqlite test-notes-contacts-budget.js && npm run test:ux-utils && npm run test:modal-utils && npm run test:reminders && npm run test:api && npm run test:ics-parser && npm run test:ics-sub && npm run test:setup && npm run test:kitchen-tabs && npm run test:backup-scheduler && npm run test:caldav"
},
"dependencies": {
"bcrypt": "^6.0.0",