Skip to content

Commit 9cdf720

Browse files
authored
test(browser): Test moduleMetadataIntegration in CDN bundle integration tests (#15053)
1 parent d464269 commit 9cdf720

File tree

4 files changed

+8
-13
lines changed
  • dev-packages/browser-integration-tests/suites/integrations/moduleMetadata

4 files changed

+8
-13
lines changed

dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/init.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import * as Sentry from '@sentry/browser';
22

3+
import { moduleMetadataIntegration } from '@sentry/browser';
4+
35
Sentry.init({
46
dsn: 'https://[email protected]/1337',
5-
integrations: [Sentry.moduleMetadataIntegration()],
7+
integrations: [moduleMetadataIntegration()],
68
beforeSend(event) {
79
const moduleMetadataEntries = [];
810

dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts

-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
66

77
sentryTest('should provide module_metadata on stack frames in beforeSend', async ({ getLocalTestUrl, page }) => {
8-
// moduleMetadataIntegration is not included in any CDN bundles
9-
if (process.env.PW_BUNDLE?.startsWith('bundle')) {
10-
sentryTest.skip();
11-
}
12-
138
const url = await getLocalTestUrl({ testDir: __dirname });
149

1510
const errorEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);

dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/init.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import * as Sentry from '@sentry/browser';
22

3+
import { moduleMetadataIntegration } from '@sentry/browser';
4+
import { rewriteFramesIntegration } from '@sentry/browser';
5+
36
Sentry.init({
47
dsn: 'https://[email protected]/1337',
58
integrations: [
6-
Sentry.moduleMetadataIntegration(),
7-
Sentry.rewriteFramesIntegration({
9+
moduleMetadataIntegration(),
10+
rewriteFramesIntegration({
811
iteratee: frame => {
912
return {
1013
...frame,

dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
77
sentryTest(
88
'should provide module_metadata on stack frames in beforeSend even though an event processor (rewriteFramesIntegration) modified the filename',
99
async ({ getLocalTestUrl, page }) => {
10-
// moduleMetadataIntegration is not included in any CDN bundles
11-
if (process.env.PW_BUNDLE?.startsWith('bundle')) {
12-
sentryTest.skip();
13-
}
14-
1510
const url = await getLocalTestUrl({ testDir: __dirname });
1611

1712
const errorEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);

0 commit comments

Comments
 (0)