refactor: adapt for typeorm 0.3

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-03-20 22:40:41 +01:00
parent a07b5f54d1
commit c4975e4783
21 changed files with 131 additions and 69 deletions

View file

@ -98,7 +98,7 @@ describe('RevisionsService', () => {
expect(await service.getRevision({} as Note, 1)).toEqual(revision);
});
it('throws if the revision is not in the databse', async () => {
jest.spyOn(revisionRepo, 'findOne').mockResolvedValueOnce(undefined);
jest.spyOn(revisionRepo, 'findOne').mockResolvedValueOnce(null);
await expect(service.getRevision({} as Note, 1)).rejects.toThrow(
NotInDBError,
);