test(calendar): clean up merged calendars directory after tests
This commit is contained in:
parent
18215a89f6
commit
869beeb3d4
|
@ -25,6 +25,12 @@ describe('Calendar Merging API', () => {
|
||||||
// Ensure the server is closed before cleanup
|
// Ensure the server is closed before cleanup
|
||||||
await new Promise(resolve => server.close(resolve));
|
await new Promise(resolve => server.close(resolve));
|
||||||
|
|
||||||
|
// Clean up the merged calendars directory after tests
|
||||||
|
fs.rmdirSync(CALENDARS_DIR, { recursive: true });
|
||||||
|
if (fs.existsSync(CALENDARS_DIR)) {
|
||||||
|
fs.rmdirSync(CALENDARS_DIR, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
// Optional: Add a delay to ensure all handles are released
|
// Optional: Add a delay to ensure all handles are released
|
||||||
await new Promise(resolve => setTimeout(resolve, 100));
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue