refactor: remove isomorphic-ws

The package caused some issues while working on other features.
Mostly because bundlers have been unable to determine the correct
websocket constructor.
So I replaced it with a more object-oriented approach.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-31 22:38:45 +02:00
parent 14ba7ea9ce
commit 753c6e593f
23 changed files with 724 additions and 283 deletions

View file

@ -8,13 +8,10 @@ import type { Note, NoteMetadata } from '../../../api/notes/types'
import * as useSingleStringUrlParameterModule from '../../../hooks/common/use-single-string-url-parameter'
import { mockI18n } from '../../../test-utils/mock-i18n'
import { CreateNonExistingNoteHint } from './create-non-existing-note-hint'
import { waitForOtherPromisesToFinish } from '@hedgedoc/commons'
import { act, render, screen, waitFor } from '@testing-library/react'
import { Mock } from 'ts-mockery'
function waitForOtherPromisesToFinish(): Promise<void> {
return new Promise((resolve) => process.nextTick(resolve))
}
jest.mock('../../../api/notes')
jest.mock('../../../hooks/common/use-single-string-url-parameter')