Skip to content

test(replay): Streamline replay test imports #6486

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
Dec 12, 2022
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 9, 2022

This PR does some further streamlining of replay test code.
Specifically, it tries to avoid mocking of code with jest as much as possible, only doing so when necessary.

Also, it introduces an autoStart argument to mockSdk, which can be used to make the SDK not start automatically. As this can make some tests weird/brittle. (Currently, only one test, but maybe more tests could use this).

@mydea mydea added the Package: replay Issues related to the Sentry Replay SDK label Dec 9, 2022
@mydea mydea requested review from billyvg and Lms24 December 9, 2022 12:56
@mydea mydea self-assigned this Dec 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.68 KB (-0.02% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.96 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.47 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 54.51 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.27 KB (0%)
@sentry/browser - Webpack (minified) 66.25 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.29 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.29 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.67 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.12 KB (+0.01% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 41.83 KB (+0.1% 🔺)
@sentry/replay - Webpack (gzipped + minified) 37.89 KB (+0.03% 🔺)

@mydea mydea force-pushed the fn/replay-tests-2 branch from ef13fda to 6332a15 Compare December 12, 2022 08:47
@mydea mydea merged commit 8ae1ce4 into master Dec 12, 2022
@mydea mydea deleted the fn/replay-tests-2 branch December 12, 2022 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants