Skip to content

Commit c48dd54

Browse files
committed
fix(test): Exclude localhost requests from HTTP span count
1 parent dcc6a47 commit c48dd54

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

samples/react-native/e2e/captureSpaceflightNewsScreenTransaction.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ describe('Capture Spaceflight News Screen Transaction', () => {
119119
console.log(spans);
120120

121121
const httpSpans = spans?.filter(
122-
span => span.data?.['sentry.op'] === 'http.client',
122+
span =>
123+
span.data?.['sentry.op'] === 'http.client' &&
124+
span.data?.['server.address'] === 'api.spaceflightnewsapi.net'
123125
);
124126
expect(httpSpans).toHaveLength(2);
125127
});

0 commit comments

Comments
 (0)