Skip to content

test(replay): Streamline replay test naming & modules #6656

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
Jan 11, 2023
Merged

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 4, 2023

This PR streamlines the replay tests a bit. This includes mainly four things:

  1. Actually split the tests between unit & integration tests. Currently, we have all tests in the unit folder, although some of them are really integration tests (basically anything using mockSdk or resetSdkMock, I'd say).
  2. Split up some of the integration tests into more meaningful groups.
    a. We had a bunch of stuff in index.test.ts and noSticky.test.ts and others that I tried to group together in the new modules like sendReplayEvent, sampling, events or session
  3. Ensure all tests are in a top-level describe() block, for consistency with other tests
    a. I also streamlined the names of the tests, while at it
  4. In some places that allowed to actually remove some unneeded test setup (e.g. when only one or two tests actually needed some setup, ...)

I have not removed any test, only moved stuff around.

@mydea mydea added Type: Tests Package: replay Issues related to the Sentry Replay SDK labels Jan 4, 2023
@mydea mydea requested review from billyvg and Lms24 January 4, 2023 15:25
@mydea mydea self-assigned this Jan 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.84 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 61.46 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.62 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 55 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.38 KB (0%)
@sentry/browser - Webpack (minified) 66.55 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.4 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.63 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.82 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.25 KB (-0.02% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.04 KB (+0.01% 🔺)
@sentry/replay - Webpack (gzipped + minified) 38.25 KB (-0.01% 🔽)

Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for cleaning this up!

@mydea mydea force-pushed the fn/replay-tests branch 4 times, most recently from dc2cf4a to 6958ede Compare January 11, 2023 10:49
@mydea mydea merged commit 1cf0ae0 into master Jan 11, 2023
@mydea mydea deleted the fn/replay-tests branch January 11, 2023 13:32
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 Type: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants