Skip to content

Commit a099980

Browse files
authored
test(browser): Fix flaky test in test/utils/lazyLoadIntegration.test.ts (#13213)
Fixes #13184 We can now await here because we use `vitest`, so there should be no jsdom problems :) But really these tests should live in playwright instead.
1 parent 6a8e89d commit a099980

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/browser/test/utils/lazyLoadIntegration.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ describe('lazyLoadIntegration', () => {
7171
httpClientIntegration: undefined,
7272
};
7373

74-
// We do not await here, as this this does not seem to work with JSDOM :(
75-
// We have browser integration tests to check that this actually works
76-
void lazyLoadIntegration('httpClientIntegration');
74+
try {
75+
await lazyLoadIntegration('httpClientIntegration');
76+
} catch {
77+
// skip
78+
}
7779

7880
expect(global.document.querySelectorAll('script')).toHaveLength(1);
7981
expect(global.document.querySelector('script')?.src).toEqual(

0 commit comments

Comments
 (0)