Tests: Fix eslint errors

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-04-12 18:05:27 +02:00 committed by David Mehren
parent ff44a6567e
commit 9759d85fdd
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
8 changed files with 108 additions and 141 deletions

View file

@ -48,11 +48,9 @@ describe('GroupsService', () => {
});
it('fails with non-existing group', async () => {
jest.spyOn(groupRepo, 'findOne').mockResolvedValueOnce(undefined);
try {
await service.getGroupByName('i_dont_exist');
} catch (e) {
expect(e).toBeInstanceOf(NotInDBError);
}
await expect(service.getGroupByName('i_dont_exist')).rejects.toThrow(
NotInDBError,
);
});
});