Skip to content

Commit 7177c9b

Browse files
authored
ref(test): Refactor Node integration tests to prevent nock leaks. (#5579)
Currently, Node integration tests initialize nock interceptors on server initialization and end them after a certain timeout. This recently created problems with asynchronous event processors, and caused random cases of envelope leaks between tests. To resolve it, this approach returns `http.Server` and `nock.Scope` instances back to the test, to eventually be provided to a helper that either collects envelopes or makes requests. The responsibility of ending those two instances is moved to the collection helpers like `getEnvelopeRequest` or `getAPIResponse`. Tests that do not use those helpers should close the server and nock interceptors manually. This way, we ensure that we do not lose the context of the server and the nock interceptors between tests.
1 parent 3bb8d17 commit 7177c9b

File tree

50 files changed

+295
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+295
-196
lines changed

packages/node-integration-tests/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ A custom server configuration can be used, supplying a script that exports a val
3333

3434
`utils/` contains helpers and Sentry-specific assertions that can be used in (`test.ts`).
3535

36+
`runServer` utility function returns an object containing `url`, [`http.Server`](https://nodejs.org/dist/latest-v16.x/docs/api/http.html#class-httpserver) and [`nock.Scope`](https://github.com/nock/nock#usage) instances for the created server. The `url` property is the base URL for the server. The `http.Server` instance is used to finish the server eventually, and the `nock.Scope` instance is used to bind / unbind interceptors for the test case.
37+
38+
The responsibility of ending the server and interceptor is delegated to the test case. Data collection helpers such as `getEnvelopeRequest` and `getAPIResponse` expect those instances to be available and finish them before their resolution. Test that do not use those helpers will need to end the server and interceptors manually.
3639
## Running Tests Locally
3740

3841
Tests can be run locally with:

packages/node-integration-tests/suites/express/handle-error/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getEnvelopeRequest, runServer } from '../../../utils/index';
22

33
test('should capture and send Express controller error.', async () => {
4-
const url = await runServer(__dirname, `${__dirname}/server.ts`);
5-
const event = await getEnvelopeRequest(`${url}/express`);
4+
const { url, server, scope } = await runServer(__dirname, `${__dirname}/server.ts`);
5+
const event = await getEnvelopeRequest({ url: `${url}/express`, server, scope });
66

77
expect((event[2] as any).exception.values[0].stacktrace.frames.length).toBeGreaterThan(0);
88

packages/node-integration-tests/suites/express/sentry-trace/baggage-header-assign/test.ts

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
44
import { TestAPIResponse } from '../server';
55

66
test('Should not overwrite baggage if the incoming request already has Sentry baggage data.', async () => {
7-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
7+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
88

9-
const response = (await getAPIResponse(new URL(`${url}/express`), {
10-
baggage: 'sentry-release=2.0.0,sentry-environment=myEnv',
11-
})) as TestAPIResponse;
9+
const response = (await getAPIResponse(
10+
{ url: `${url}/express`, server, scope },
11+
{
12+
baggage: 'sentry-release=2.0.0,sentry-environment=myEnv',
13+
},
14+
)) as TestAPIResponse;
1215

1316
expect(response).toBeDefined();
1417
expect(response).toMatchObject({
@@ -20,12 +23,15 @@ test('Should not overwrite baggage if the incoming request already has Sentry ba
2023
});
2124

2225
test('Should propagate sentry trace baggage data from an incoming to an outgoing request.', async () => {
23-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
26+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
2427

25-
const response = (await getAPIResponse(new URL(`${url}/express`), {
26-
'sentry-trace': '',
27-
baggage: 'sentry-release=2.0.0,sentry-environment=myEnv,dogs=great',
28-
})) as TestAPIResponse;
28+
const response = (await getAPIResponse(
29+
{ url: `${url}/express`, server, scope },
30+
{
31+
'sentry-trace': '',
32+
baggage: 'sentry-release=2.0.0,sentry-environment=myEnv,dogs=great',
33+
},
34+
)) as TestAPIResponse;
2935

3036
expect(response).toBeDefined();
3137
expect(response).toMatchObject({
@@ -37,11 +43,14 @@ test('Should propagate sentry trace baggage data from an incoming to an outgoing
3743
});
3844

3945
test('Should propagate empty baggage if sentry-trace header is present in incoming request but no baggage header', async () => {
40-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
46+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
4147

42-
const response = (await getAPIResponse(new URL(`${url}/express`), {
43-
'sentry-trace': '',
44-
})) as TestAPIResponse;
48+
const response = (await getAPIResponse(
49+
{ url: `${url}/express`, server, scope },
50+
{
51+
'sentry-trace': '',
52+
},
53+
)) as TestAPIResponse;
4554

4655
expect(response).toBeDefined();
4756
expect(response).toMatchObject({
@@ -53,12 +62,15 @@ test('Should propagate empty baggage if sentry-trace header is present in incomi
5362
});
5463

5564
test('Should propagate empty sentry and ignore original 3rd party baggage entries if sentry-trace header is present', async () => {
56-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
65+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
5766

58-
const response = (await getAPIResponse(new URL(`${url}/express`), {
59-
'sentry-trace': '',
60-
baggage: 'foo=bar',
61-
})) as TestAPIResponse;
67+
const response = (await getAPIResponse(
68+
{ url: `${url}/express`, server, scope },
69+
{
70+
'sentry-trace': '',
71+
baggage: 'foo=bar',
72+
},
73+
)) as TestAPIResponse;
6274

6375
expect(response).toBeDefined();
6476
expect(response).toMatchObject({
@@ -70,9 +82,9 @@ test('Should propagate empty sentry and ignore original 3rd party baggage entrie
7082
});
7183

7284
test('Should populate and propagate sentry baggage if sentry-trace header does not exist', async () => {
73-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
85+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
7486

75-
const response = (await getAPIResponse(new URL(`${url}/express`), {})) as TestAPIResponse;
87+
const response = (await getAPIResponse({ url: `${url}/express`, server, scope }, {})) as TestAPIResponse;
7688

7789
expect(response).toBeDefined();
7890
expect(response).toMatchObject({
@@ -87,11 +99,14 @@ test('Should populate and propagate sentry baggage if sentry-trace header does n
8799
});
88100

89101
test('Should populate Sentry and ignore 3rd party content if sentry-trace header does not exist', async () => {
90-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
102+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
91103

92-
const response = (await getAPIResponse(new URL(`${url}/express`), {
93-
baggage: 'foo=bar,bar=baz',
94-
})) as TestAPIResponse;
104+
const response = (await getAPIResponse(
105+
{ url: `${url}/express`, server, scope },
106+
{
107+
baggage: 'foo=bar,bar=baz',
108+
},
109+
)) as TestAPIResponse;
95110

96111
expect(response).toBeDefined();
97112
expect(response).toMatchObject({

packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out-bad-tx-name/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
44
import { TestAPIResponse } from '../server';
55

66
test('Does not include transaction name if transaction source is not set', async () => {
7-
const url = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
7+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
88

9-
const response = (await getAPIResponse(new URL(`${url}/express`))) as TestAPIResponse;
9+
const response = (await getAPIResponse({ url: `${url}/express`, server, scope })) as TestAPIResponse;
1010
const baggageString = response.test_data.baggage;
1111

1212
expect(response).toBeDefined();

packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
44
import { TestAPIResponse } from '../server';
55

66
test('should attach a `baggage` header to an outgoing request.', async () => {
7-
const url = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
7+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
88

9-
const response = (await getAPIResponse(new URL(`${url}/express`))) as TestAPIResponse;
9+
const response = (await getAPIResponse({ url: `${url}/express`, server, scope })) as TestAPIResponse;
1010

1111
expect(response).toBeDefined();
1212
expect(response).toMatchObject({

packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
44
import { TestAPIResponse } from '../server';
55

66
test('should ignore sentry-values in `baggage` header of a third party vendor and overwrite them with incoming DSC', async () => {
7-
const url = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
7+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
88

9-
const response = (await getAPIResponse(new URL(`${url}/express`), {
10-
'sentry-trace': '',
11-
baggage: 'sentry-release=2.1.0,sentry-environment=myEnv',
12-
})) as TestAPIResponse;
9+
const response = (await getAPIResponse(
10+
{ url: `${url}/express`, server, scope },
11+
{
12+
'sentry-trace': '',
13+
baggage: 'sentry-release=2.1.0,sentry-environment=myEnv',
14+
},
15+
)) as TestAPIResponse;
1316

1417
expect(response).toBeDefined();
1518
expect(response).toMatchObject({
@@ -21,9 +24,9 @@ test('should ignore sentry-values in `baggage` header of a third party vendor an
2124
});
2225

2326
test('should ignore sentry-values in `baggage` header of a third party vendor and overwrite them with new DSC', async () => {
24-
const url = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
27+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
2528

26-
const response = (await getAPIResponse(new URL(`${url}/express`), {})) as TestAPIResponse;
29+
const response = (await getAPIResponse({ url: `${url}/express`, server, scope }, {})) as TestAPIResponse;
2730

2831
expect(response).toBeDefined();
2932
expect(response).toMatchObject({

packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/test.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
44
import { TestAPIResponse } from '../server';
55

66
test('should merge `baggage` header of a third party vendor with the Sentry DSC baggage items', async () => {
7-
const url = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
7+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
88

9-
const response = (await getAPIResponse(new URL(`${url}/express`), {
10-
'sentry-trace': '',
11-
baggage: 'sentry-release=2.0.0,sentry-environment=myEnv',
12-
})) as TestAPIResponse;
9+
const response = (await getAPIResponse(
10+
{ url: `${url}/express`, server, scope },
11+
{
12+
'sentry-trace': '',
13+
baggage: 'sentry-release=2.0.0,sentry-environment=myEnv',
14+
},
15+
)) as TestAPIResponse;
1316

1417
expect(response).toBeDefined();
1518
expect(response).toMatchObject({

packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
44
import { TestAPIResponse } from '../server';
55

66
test('Includes transaction in baggage if the transaction name is parameterized', async () => {
7-
const url = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
7+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`);
88

9-
const response = (await getAPIResponse(new URL(`${url}/express`))) as TestAPIResponse;
9+
const response = (await getAPIResponse({ url: `${url}/express`, server, scope })) as TestAPIResponse;
1010

1111
expect(response).toBeDefined();
1212
expect(response).toMatchObject({

packages/node-integration-tests/suites/express/sentry-trace/trace-header-assign/test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
55
import { TestAPIResponse } from '../server';
66

77
test('Should assign `sentry-trace` header which sets parent trace id of an outgoing request.', async () => {
8-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
8+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
99

10-
const response = (await getAPIResponse(new URL(`${url}/express`), {
11-
'sentry-trace': '12312012123120121231201212312012-1121201211212012-0',
12-
})) as TestAPIResponse;
10+
const response = (await getAPIResponse(
11+
{ url: `${url}/express`, server, scope },
12+
{
13+
'sentry-trace': '12312012123120121231201212312012-1121201211212012-0',
14+
},
15+
)) as TestAPIResponse;
1316

1417
expect(response).toBeDefined();
1518
expect(response).toMatchObject({

packages/node-integration-tests/suites/express/sentry-trace/trace-header-out/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { getAPIResponse, runServer } from '../../../../utils/index';
55
import { TestAPIResponse } from '../server';
66

77
test('should attach a `sentry-trace` header to an outgoing request.', async () => {
8-
const url = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
8+
const { url, server, scope } = await runServer(__dirname, `${path.resolve(__dirname, '..')}/server.ts`);
99

10-
const response = (await getAPIResponse(new URL(`${url}/express`))) as TestAPIResponse;
10+
const response = (await getAPIResponse({ url: `${url}/express`, server, scope })) as TestAPIResponse;
1111

1212
expect(response).toBeDefined();
1313
expect(response).toMatchObject({

packages/node-integration-tests/suites/express/tracing/test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryTransaction, getEnvelopeRequest, runServer } from '../../../utils/index';
22

33
test('should create and send transactions for Express routes and spans for middlewares.', async () => {
4-
const url = await runServer(__dirname, `${__dirname}/server.ts`);
5-
const envelope = await getEnvelopeRequest(`${url}/express`);
4+
const { url, server, scope } = await runServer(__dirname, `${__dirname}/server.ts`);
5+
const envelope = await getEnvelopeRequest({ url: `${url}/express`, server, scope });
66

77
expect(envelope).toHaveLength(3);
88

@@ -29,8 +29,8 @@ test('should create and send transactions for Express routes and spans for middl
2929
});
3030

3131
test('should set a correct transaction name for routes specified in RegEx', async () => {
32-
const url = await runServer(__dirname, `${__dirname}/server.ts`);
33-
const envelope = await getEnvelopeRequest(`${url}/regex`);
32+
const { url, server, scope } = await runServer(__dirname, `${__dirname}/server.ts`);
33+
const envelope = await getEnvelopeRequest({ url: `${url}/regex`, server, scope });
3434

3535
expect(envelope).toHaveLength(3);
3636

@@ -57,8 +57,8 @@ test('should set a correct transaction name for routes specified in RegEx', asyn
5757
test.each([['array1'], ['array5']])(
5858
'should set a correct transaction name for routes consisting of arrays of routes',
5959
async segment => {
60-
const url = await runServer(__dirname, `${__dirname}/server.ts`);
61-
const envelope = await getEnvelopeRequest(`${url}/${segment}`);
60+
const { url, server, scope } = await runServer(__dirname, `${__dirname}/server.ts`);
61+
const envelope = await getEnvelopeRequest({ url: `${url}/${segment}`, server, scope });
6262

6363
expect(envelope).toHaveLength(3);
6464

@@ -93,8 +93,8 @@ test.each([
9393
['arr/requiredPath/optionalPath/'],
9494
['arr/requiredPath/optionalPath/lastParam'],
9595
])('should handle more complex regexes in route arrays correctly', async segment => {
96-
const url = await runServer(__dirname, `${__dirname}/server.ts`);
97-
const envelope = await getEnvelopeRequest(`${url}/${segment}`);
96+
const { url, server, scope } = await runServer(__dirname, `${__dirname}/server.ts`);
97+
const envelope = await getEnvelopeRequest({ url: `${url}/${segment}`, server, scope });
9898

9999
expect(envelope).toHaveLength(3);
100100

packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should add an empty breadcrumb, when an empty object is given', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 2);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 2 });
66
const errorEnvelope = envelopes[1];
77

88
expect(errorEnvelope).toHaveLength(3);

packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should add multiple breadcrumbs', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 2);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 2 });
66

77
assertSentryEvent(envelopes[1][2], {
88
message: 'test_multi_breadcrumbs',

packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should add a simple breadcrumb', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 2);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 2 });
66

77
assertSentryEvent(envelopes[1][2], {
88
message: 'test_simple',

packages/node-integration-tests/suites/public-api/captureException/catched-error/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should work inside catch block', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 2);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 2 });
66
const errorEnvelope = envelopes[1];
77

88
assertSentryEvent(errorEnvelope[2], {

packages/node-integration-tests/suites/public-api/captureException/empty-obj/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should capture an empty object', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 2);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 2 });
66
const errorEnvelope = envelopes[1];
77

88
assertSentryEvent(errorEnvelope[2], {

packages/node-integration-tests/suites/public-api/captureException/simple-error/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should capture a simple error with message', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 2);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 2 });
66
const errorEnvelope = envelopes[1];
77

88
assertSentryEvent(errorEnvelope[2], {

packages/node-integration-tests/suites/public-api/captureMessage/simple_message/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should capture a simple message string', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 2);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 2 });
66
const errorEnvelope = envelopes[1];
77

88
assertSentryEvent(errorEnvelope[2], {

packages/node-integration-tests/suites/public-api/captureMessage/with_level/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { assertSentryEvent, getMultipleEnvelopeRequest, runServer } from '../../../../utils';
22

33
test('should capture with different severity levels', async () => {
4-
const url = await runServer(__dirname);
5-
const envelopes = await getMultipleEnvelopeRequest(url, 12);
4+
const config = await runServer(__dirname);
5+
const envelopes = await getMultipleEnvelopeRequest(config, { count: 12 });
66

77
assertSentryEvent(envelopes[1][2], {
88
message: 'debug_message',

packages/node-integration-tests/suites/public-api/configureScope/clear_scope/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { Event } from '@sentry/node';
33
import { assertSentryEvent, getEnvelopeRequest, runServer } from '../../../../utils';
44

55
test('should clear previously set properties of a scope', async () => {
6-
const url = await runServer(__dirname);
7-
const envelope = await getEnvelopeRequest(url);
6+
const config = await runServer(__dirname);
7+
const envelope = await getEnvelopeRequest(config);
88

99
assertSentryEvent(envelope[2], {
1010
message: 'cleared_scope',

0 commit comments

Comments
 (0)