mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
test: ensure testSetup.cleanup is called
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
f0e6f6150d
commit
a6734cc58f
14 changed files with 55 additions and 28 deletions
|
@ -41,6 +41,11 @@ describe('Notes', () => {
|
|||
testImage = await fs.readFile('test/public-api/fixtures/test.png');
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await testSetup.app.close();
|
||||
await testSetup.cleanup();
|
||||
});
|
||||
|
||||
it('POST /notes', async () => {
|
||||
const response = await request(testSetup.app.getHttpServer())
|
||||
.post('/api/v2/notes')
|
||||
|
@ -212,6 +217,7 @@ describe('Notes', () => {
|
|||
expect(await updatedNote.groupPermissions).toHaveLength(0);
|
||||
await request(testSetup.app.getHttpServer())
|
||||
.delete('/api/v2/notes/test3')
|
||||
.send({ keepMedia: false })
|
||||
.expect(204);
|
||||
await expect(
|
||||
testSetup.notesService.getNoteByIdOrAlias('test3'),
|
||||
|
@ -463,8 +469,4 @@ describe('Notes', () => {
|
|||
.expect(403);
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await testSetup.app.close();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue