Clean up the merged calendars directory before tests

This commit is contained in:
Ryan Mwangi 2024-11-25 20:00:02 +03:00
parent 5b40bf5d75
commit 5ec42d07bb
1 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,11 @@ describe('Calendar Merging API', () => {
beforeAll(async () => {
// Start the server
server = app.listen(0);
// Clean up the merged calendars directory before tests
fs.rmdirSync(CALENDARS_DIR, { recursive: true });
if (fs.existsSync(CALENDARS_DIR)) {
fs.rmdirSync(CALENDARS_DIR, { recursive: true });
}
});
afterAll(async () => {