Skip to content

Conversation

@onurtemizkan
Copy link
Collaborator

Part of: #4333

@github-actions
Copy link
Contributor

github-actions bot commented Dec 21, 2021

size-limit report

Path Base Size (4cd71c5) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.72 KB 19.72 KB +0.01% 🔺
@sentry/browser - CDN Bundle (minified) 62.76 KB 62.77 KB +0.01% 🔺
@sentry/browser - Webpack 22.25 KB 22.25 KB 0%
@sentry/browser - Webpack - gzip = false 75.92 KB 75.92 KB 0%
@sentry/react - Webpack 22.29 KB 22.29 KB 0%
@sentry/nextjs Client - Webpack 46.41 KB 46.41 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.37 KB 28.38 KB +0.02% 🔺

@onurtemizkan onurtemizkan changed the title Add integration tests for captureMessage test(browser): Add integration tests for captureMessage Dec 21, 2021
@smeubank smeubank added this to the Release Stability milestone Dec 21, 2021

expect(eventData.message).toBe('message_with_hint');
expect(eventData.level).toBe('error');
expect((eventData as Event & { hint: EventHint }).hint.captureContext).toMatchObject({
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to assert on the hint here, we can just unit test that.

Sentry.init({
dsn: 'https://[email protected]/1337',
beforeSend: event => {
window.events.push(event);
Copy link
Member

Choose a reason for hiding this comment

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

we can remove this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AbhiPrasad, I have opened a PR for an alternative implementation for getting multiple events into tests without this hack. could you take a look? -> #4355

@onurtemizkan onurtemizkan force-pushed the onur/public-api-tests-capture-message branch from 2f4d184 to 11254fc Compare December 22, 2021 21:35
@AbhiPrasad AbhiPrasad merged commit 01161b0 into master Dec 22, 2021
@AbhiPrasad AbhiPrasad deleted the onur/public-api-tests-capture-message branch December 22, 2021 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants