E2ETests: Use recursive for 'uploads/' deletion.

This ensures the folder is always deleted, even if there are still files (from previous broken tests) in it.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-03-31 22:42:56 +02:00 committed by David Mehren
parent 9b54733ed3
commit be78b9a03d
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 3 additions and 3 deletions

View file

@ -256,7 +256,7 @@ describe('Notes', () => {
// delete the file afterwards
await fs.unlink(join(uploadPath, fileName));
}
await fs.rmdir(uploadPath);
await fs.rmdir(uploadPath, { recursive: true });
});
it('fails, when note does not exist', async () => {
await request(app.getHttpServer())

View file

@ -270,7 +270,7 @@ describe('Me', () => {
// delete the file afterwards
await fs.unlink(join(uploadPath, fileName));
}
await fs.rmdir(uploadPath);
await fs.rmdir(uploadPath, { recursive: true });
});
afterAll(async () => {

View file

@ -362,7 +362,7 @@ describe('Notes', () => {
// delete the file afterwards
await fs.unlink(join(uploadPath, fileName));
}
await fs.rmdir(uploadPath);
await fs.rmdir(uploadPath, { recursive: true });
});
it('fails, when note does not exist', async () => {
await request(app.getHttpServer())