mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-24 18:56:32 -05:00
fix(backend): Remove redundant test
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
38bcb9affd
commit
74178b6edf
1 changed files with 0 additions and 24 deletions
|
@ -215,30 +215,6 @@ describe('RealtimeNoteService', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('logs errors that occur during saving on destroy', async () => {
|
||||
mockGetLatestRevision(true);
|
||||
const mockedCurrentContent = 'mockedCurrentContent';
|
||||
|
||||
jest.spyOn(realtimeNoteStore, 'find').mockImplementation(() => undefined);
|
||||
jest
|
||||
.spyOn(realtimeNoteStore, 'create')
|
||||
.mockImplementation(() => mockedRealtimeNote);
|
||||
jest
|
||||
.spyOn(websocketDoc, 'getCurrentContent')
|
||||
.mockReturnValue(mockedCurrentContent);
|
||||
jest
|
||||
.spyOn(revisionsService, 'createRevision')
|
||||
.mockImplementation(() => Promise.reject('mocked error'));
|
||||
|
||||
const logSpy = jest.spyOn(consoleLoggerService, 'error');
|
||||
|
||||
await realtimeNoteService.getOrCreateRealtimeNote(mockedNote);
|
||||
mockedRealtimeNote.emit('beforeDestroy');
|
||||
|
||||
await waitForOtherPromisesToFinish();
|
||||
expect(logSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('destroys every realtime note on application shutdown', () => {
|
||||
jest
|
||||
.spyOn(realtimeNoteStore, 'getAllRealtimeNotes')
|
||||
|
|
Loading…
Reference in a new issue