Skip to content

test(loader): Ensure loader handles SDK being loaded in the meanwhile#7970

Merged
mydea merged 2 commits intodevelopfrom
fn/add-test-loader
May 3, 2023
Merged

test(loader): Ensure loader handles SDK being loaded in the meanwhile#7970
mydea merged 2 commits intodevelopfrom
fn/add-test-loader

Conversation

@mydea
Copy link
Copy Markdown
Member

@mydea mydea commented Apr 26, 2023

This adds a test for the JS loader script to ensure we do not send errors multiple times if the SDK has been loaded in the meanwhile.

@mydea mydea requested a review from AbhiPrasad April 26, 2023 11:28
@mydea mydea self-assigned this Apr 26, 2023
@mydea mydea force-pushed the fn/add-test-loader branch from 6236b24 to cae5ead Compare May 2, 2023 08:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 2, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.02 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 65.66 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.56 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 58.12 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.17 KB (0%)
@sentry/browser - Webpack (minified) 69.07 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.19 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.09 KB (+0.08% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.65 KB (+0.07% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.87 KB (+0.13% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 46.87 KB (+0.01% 🔺)
@sentry/replay - Webpack (gzipped + minified) 40.67 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 65.75 KB (+0.06% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 58.64 KB (0%)

@mydea mydea force-pushed the fn/add-test-loader branch from cae5ead to fd1ca9c Compare May 2, 2023 09:31
@mydea
Copy link
Copy Markdown
Member Author

mydea commented May 2, 2023

So after some discussion, we decided to leave behavior as it is right now, and just add a test to make sure that even though the SDK is loaded twice, errors are only sent once, and the config is not overwritten.

@mydea mydea changed the title test(loader): Ensure we only fetch CDN bundle once test(loader): Ensure loader handles SDK being loaded in the meanwhile May 2, 2023
@mydea mydea force-pushed the fn/add-test-loader branch from 626e2d1 to 93566fb Compare May 3, 2023 11:17
@mydea mydea merged commit 5c4963d into develop May 3, 2023
@mydea mydea deleted the fn/add-test-loader branch May 3, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants