diff --git a/test/private-api/media.e2e-spec.ts b/test/private-api/media.e2e-spec.ts index 2fc5f7c9a..5920ab3e5 100644 --- a/test/private-api/media.e2e-spec.ts +++ b/test/private-api/media.e2e-spec.ts @@ -133,6 +133,7 @@ describe('Media', () => { afterAll(async () => { // Delete the upload folder - await fs.rmdir(uploadPath); + await fs.rmdir(uploadPath, { recursive: true }); + await app.close(); }); }); diff --git a/test/public-api/media.e2e-spec.ts b/test/public-api/media.e2e-spec.ts index 97d35eb86..78a95b56f 100644 --- a/test/public-api/media.e2e-spec.ts +++ b/test/public-api/media.e2e-spec.ts @@ -142,6 +142,7 @@ describe('Media', () => { afterAll(async () => { // Delete the upload folder - await fs.rmdir(uploadPath); + await fs.rmdir(uploadPath, { recursive: true }); + await app.close(); }); });