From 8f163c074805e09570633d9a2d44dbfb937e790d Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Fri, 2 Aug 2024 18:27:24 -0400 Subject: [PATCH] test(browser): Fix flaky test in test/utils/lazyLoadIntegration.test.ts --- packages/browser/test/utils/lazyLoadIntegration.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/browser/test/utils/lazyLoadIntegration.test.ts b/packages/browser/test/utils/lazyLoadIntegration.test.ts index ec88ae49a1a9..82548a59faec 100644 --- a/packages/browser/test/utils/lazyLoadIntegration.test.ts +++ b/packages/browser/test/utils/lazyLoadIntegration.test.ts @@ -71,9 +71,11 @@ describe('lazyLoadIntegration', () => { httpClientIntegration: undefined, }; - // We do not await here, as this this does not seem to work with JSDOM :( - // We have browser integration tests to check that this actually works - void lazyLoadIntegration('httpClientIntegration'); + try { + await lazyLoadIntegration('httpClientIntegration'); + } catch { + // skip + } expect(global.document.querySelectorAll('script')).toHaveLength(1); expect(global.document.querySelector('script')?.src).toEqual(