From 4311619f64c0527fa712940575de22dae588f220 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Tue, 29 Oct 2024 21:40:57 +0300 Subject: [PATCH] Check if the file was created --- calendar.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar.test.js b/calendar.test.js index 980d34e..86396a9 100644 --- a/calendar.test.js +++ b/calendar.test.js @@ -33,6 +33,10 @@ describe('Calendar Merging API', () => { }); expect(response.status).toBe(200); expect(response.body.url).toMatch(/calendar\/Date_Based_Calendar/); - }) + + // Check if the file was created + const filePath = path.join(MERGED_CALENDARS_DIR, 'Date_Based_Calendar.ics'); + expect(fs.existsSync(filePath)).toBe(true); + }); }); \ No newline at end of file