diff --git a/calendar.test.js b/calendar.test.js index 72f4ed6..f7b9e07 100644 --- a/calendar.test.js +++ b/calendar.test.js @@ -22,7 +22,9 @@ describe('Calendar Merging API', () => { afterAll( async () => { // Clean up the merged calendars directory after tests - fs.rmdirSync(MERGED_CALENDARS_DIR, { recursive: true }); + if (fs.existsSync(MERGED_CALENDARS_DIR)) { + fs.rmdirSync(MERGED_CALENDARS_DIR, { recursive: true }); + } }); test('Merge date-based calendar', async () => {