diff --git a/plugins/techdocs/src/client.test.ts b/plugins/techdocs/src/client.test.ts index 71ad57d12a..8236b93c55 100644 --- a/plugins/techdocs/src/client.test.ts +++ b/plugins/techdocs/src/client.test.ts @@ -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; @@ -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;