Skip to content

Commit d58da1c

Browse files
committed
Update integration tests
1 parent 44e1068 commit d58da1c

File tree

8 files changed

+55
-5
lines changed

8 files changed

+55
-5
lines changed

dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ sentryTest(
4040
type: 'http.client',
4141
handled: false,
4242
},
43+
stacktrace: {
44+
frames: expect.arrayContaining([
45+
expect.objectContaining({
46+
filename: 'http://sentry-test.io/subject.bundle.js',
47+
function: '?',
48+
in_app: true,
49+
}),
50+
]),
51+
},
4352
},
4453
],
4554
},

dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ sentryTest(
4242
type: 'http.client',
4343
handled: false,
4444
},
45+
stacktrace: {
46+
frames: expect.arrayContaining([
47+
expect.objectContaining({
48+
filename: 'http://sentry-test.io/subject.bundle.js',
49+
function: '?',
50+
in_app: true,
51+
}),
52+
]),
53+
},
4554
},
4655
],
4756
},

dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ sentryTest('works with a Request passed in', async ({ getLocalTestUrl, page }) =
3838
type: 'http.client',
3939
handled: false,
4040
},
41+
stacktrace: {
42+
frames: expect.arrayContaining([
43+
expect.objectContaining({
44+
filename: 'http://sentry-test.io/subject.bundle.js',
45+
function: '?',
46+
in_app: true,
47+
}),
48+
]),
49+
},
4150
},
4251
],
4352
},

dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ sentryTest(
4040
type: 'http.client',
4141
handled: false,
4242
},
43+
stacktrace: {
44+
frames: expect.arrayContaining([
45+
expect.objectContaining({
46+
filename: 'http://sentry-test.io/subject.bundle.js',
47+
function: '?',
48+
in_app: true,
49+
}),
50+
]),
51+
},
4352
},
4453
],
4554
},

dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ sentryTest('works with a Request (without body) & options passed in', async ({ g
3838
type: 'http.client',
3939
handled: false,
4040
},
41+
stacktrace: {
42+
frames: expect.arrayContaining([
43+
expect.objectContaining({
44+
filename: 'http://sentry-test.io/subject.bundle.js',
45+
function: '?',
46+
in_app: true,
47+
}),
48+
]),
49+
},
4150
},
4251
],
4352
},

dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ sentryTest(
4040
type: 'http.client',
4141
handled: false,
4242
},
43+
stacktrace: {
44+
frames: expect.arrayContaining([
45+
expect.objectContaining({
46+
filename: 'http://sentry-test.io/subject.bundle.js',
47+
function: '?',
48+
in_app: true,
49+
}),
50+
]),
51+
},
4352
},
4453
],
4554
},

dev-packages/browser-integration-tests/utils/generatePlugin.ts

-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ class SentryScenarioGenerationPlugin {
176176
}
177177
: {};
178178

179-
// Checking if the current scenario has imported `@sentry/integrations`.
180179
compiler.hooks.normalModuleFactory.tap(this._name, factory => {
181180
factory.hooks.parser.for('javascript/auto').tap(this._name, parser => {
182181
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access

packages/browser/src/integrations/httpclient.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const _httpClientIntegration = ((options: Partial<HttpClientOptions> = {}) => {
4646

4747
return {
4848
name: INTEGRATION_NAME,
49-
setup(client: Client): void {
49+
setup(client): void {
5050
_wrapFetch(client, _options);
5151
_wrapXHR(client, _options);
5252
},
@@ -93,10 +93,7 @@ function _fetchResponseHandler(
9393
stacktrace: error instanceof Error ? error.stack : undefined,
9494
});
9595

96-
// withScope(scope => {
97-
// scope.setFingerprint([request.url, request.method, response.status.toString()]);
9896
captureEvent(event);
99-
// });
10097
}
10198
}
10299

0 commit comments

Comments
 (0)