diff --git a/src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts b/src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts index b74713ffe..1e7c7af4e 100644 --- a/src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts +++ b/src/realtime/websocket/utils/extract-note-id-from-request-url.spec.ts @@ -30,6 +30,13 @@ describe('extract note id from path', () => { expect(() => extractNoteIdFromRequestUrl(mockedRequest)).toThrow(); }); + it('fails if note id is empty', () => { + const mockedRequest = Mock.of({ + url: '/realtime?noteId=', + }); + expect(() => extractNoteIdFromRequestUrl(mockedRequest)).toThrow(); + }); + it('fails if path is empty', () => { const mockedRequest = Mock.of({ url: '',