techdocs: update client test to work with jsdom environment

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-03-24 13:17:59 +01:00
parent 9e1efd4d99
commit e2cfd53847
+2 -2
View File
@@ -221,7 +221,7 @@ describe('TechDocsStorageClient', () => {
const promise = storageApi.syncEntityDocs(mockEntity).then();
// flush the event loop
await new Promise(setImmediate);
await new Promise(r => setTimeout(r));
const instance = MockedEventSource.mock
.instances[0] as jest.Mocked<EventSource>;
@@ -248,7 +248,7 @@ describe('TechDocsStorageClient', () => {
const promise = storageApi.syncEntityDocs(mockEntity).then();
// flush the event loop
await new Promise(setImmediate);
await new Promise(r => setTimeout(r));
const instance = MockedEventSource.mock
.instances[0] as jest.Mocked<EventSource>;