mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
fix(backend): Fix open handles in backend test
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
d76714f2a2
commit
38bcb9affd
1 changed files with 7 additions and 0 deletions
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue