From 2e5d40432e6473ebcd8b12253a9e0951a21d3484 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Thu, 29 Apr 2021 22:06:45 +0200 Subject: [PATCH] E2E Tests: Fix ESLint errors Signed-off-by: David Mehren --- test/private-api/history.e2e-spec.ts | 4 ++-- test/public-api/media.e2e-spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/private-api/history.e2e-spec.ts b/test/private-api/history.e2e-spec.ts index 6e5b29890..79eb8d0e9 100644 --- a/test/private-api/history.e2e-spec.ts +++ b/test/private-api/history.e2e-spec.ts @@ -185,7 +185,7 @@ describe('History', () => { const entry = await historyService.createOrUpdateHistoryEntry(note2, user); expect(entry.pinStatus).toBeFalsy(); await request(app.getHttpServer()) - .put(`/me/history/${entry.note.alias}`) + .put(`/me/history/${entry.note.alias || 'undefined'}`) .send({ pinStatus: true }) .expect(200); const userEntries = await historyService.getEntriesByUser(user); @@ -199,7 +199,7 @@ describe('History', () => { const entry2 = await historyService.createOrUpdateHistoryEntry(note, user); const entryDto = historyService.toHistoryEntryDto(entry2); await request(app.getHttpServer()) - .delete(`/me/history/${entry.note.alias}`) + .delete(`/me/history/${entry.note.alias || 'undefined'}`) .expect(200); const userEntries = await historyService.getEntriesByUser(user); expect(userEntries.length).toEqual(1); diff --git a/test/public-api/media.e2e-spec.ts b/test/public-api/media.e2e-spec.ts index b2dc81b8a..af6f558e9 100644 --- a/test/public-api/media.e2e-spec.ts +++ b/test/public-api/media.e2e-spec.ts @@ -134,7 +134,7 @@ describe('Media', () => { 'hardcoded', 'test_upload_media', ); - const filename = url.split('/').pop(); + const filename = url.split('/').pop() || ''; await request(app.getHttpServer()) .delete('/media/' + filename) .expect(204);