From 22f0a05bce1798595be059c1ad842fbe33c63694 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Tue, 29 Oct 2024 21:29:24 +0300 Subject: [PATCH] Ensure the merged calendars directory exists --- calendar.test.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/calendar.test.js b/calendar.test.js index d641f77..1497ab4 100644 --- a/calendar.test.js +++ b/calendar.test.js @@ -4,4 +4,14 @@ import icalGenerator from 'ical-generator'; import fs from 'fs'; import path from 'path'; -const MERGED_CALENDARS_DIR = 'calendar'; \ No newline at end of file +const MERGED_CALENDARS_DIR = 'calendar'; + +describe('Calendar Merging API', () => { + beforeAll(() => { + // Ensure the merged calendars directory exists + if (!fs.existsSync(MERGED_CALENDARS_DIR)) { + fs.mkdirSync(MERGED_CALENDARS_DIR); + } + }); + +}); \ No newline at end of file