Skip to content

Commit

Permalink
Update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Nov 28, 2024
1 parent 44e1068 commit d58da1c
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ sentryTest(
type: 'http.client',
handled: false,
},
stacktrace: {
frames: expect.arrayContaining([
expect.objectContaining({
filename: 'http://sentry-test.io/subject.bundle.js',
function: '?',
in_app: true,
}),
]),
},
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ sentryTest(
type: 'http.client',
handled: false,
},
stacktrace: {
frames: expect.arrayContaining([
expect.objectContaining({
filename: 'http://sentry-test.io/subject.bundle.js',
function: '?',
in_app: true,
}),
]),
},
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ sentryTest('works with a Request passed in', async ({ getLocalTestUrl, page }) =
type: 'http.client',
handled: false,
},
stacktrace: {
frames: expect.arrayContaining([
expect.objectContaining({
filename: 'http://sentry-test.io/subject.bundle.js',
function: '?',
in_app: true,
}),
]),
},
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ sentryTest(
type: 'http.client',
handled: false,
},
stacktrace: {
frames: expect.arrayContaining([
expect.objectContaining({
filename: 'http://sentry-test.io/subject.bundle.js',
function: '?',
in_app: true,
}),
]),
},
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ sentryTest('works with a Request (without body) & options passed in', async ({ g
type: 'http.client',
handled: false,
},
stacktrace: {
frames: expect.arrayContaining([
expect.objectContaining({
filename: 'http://sentry-test.io/subject.bundle.js',
function: '?',
in_app: true,
}),
]),
},
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ sentryTest(
type: 'http.client',
handled: false,
},
stacktrace: {
frames: expect.arrayContaining([
expect.objectContaining({
filename: 'http://sentry-test.io/subject.bundle.js',
function: '?',
in_app: true,
}),
]),
},
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ class SentryScenarioGenerationPlugin {
}
: {};

// Checking if the current scenario has imported `@sentry/integrations`.
compiler.hooks.normalModuleFactory.tap(this._name, factory => {
factory.hooks.parser.for('javascript/auto').tap(this._name, parser => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
Expand Down
5 changes: 1 addition & 4 deletions packages/browser/src/integrations/httpclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const _httpClientIntegration = ((options: Partial<HttpClientOptions> = {}) => {

return {
name: INTEGRATION_NAME,
setup(client: Client): void {
setup(client): void {
_wrapFetch(client, _options);
_wrapXHR(client, _options);
},
Expand Down Expand Up @@ -93,10 +93,7 @@ function _fetchResponseHandler(
stacktrace: error instanceof Error ? error.stack : undefined,
});

// withScope(scope => {
// scope.setFingerprint([request.url, request.method, response.status.toString()]);
captureEvent(event);
// });
}
}

Expand Down

0 comments on commit d58da1c

Please sign in to comment.