fix(backend): Fix open handles in backend test

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-02-05 17:45:38 +01:00
parent d76714f2a2
commit 38bcb9affd

View file

@ -35,6 +35,13 @@ describe('RealtimeNoteService', () => {
let clearIntervalSpy: jest.SpyInstance; let clearIntervalSpy: jest.SpyInstance;
let deleteIntervalSpy: jest.SpyInstance; let deleteIntervalSpy: jest.SpyInstance;
afterAll(() => {
jest.useRealTimers();
});
beforeAll(() => {
jest.useFakeTimers();
});
function mockGetLatestRevision(latestRevisionExists: boolean) { function mockGetLatestRevision(latestRevisionExists: boolean) {
jest jest
.spyOn(revisionsService, 'getLatestRevision') .spyOn(revisionsService, 'getLatestRevision')