Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2023

Conversation

mydea
Copy link
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
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
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