Skip to content

Commit 61ea3f6

Browse files
Update packages/integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/test.ts
Co-authored-by: Katie Byers <[email protected]>
1 parent e44bce8 commit 61ea3f6

File tree

3 files changed

+32
-21
lines changed
  • packages/integration-tests/suites/stacktraces

3 files changed

+32
-21
lines changed

packages/integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,16 @@ sentryTest(
5050
},
5151
);
5252

53-
sentryTest('should not add any part of the function identifier inside filename', async ({ getLocalTestPath, page }) => {
54-
const url = await getLocalTestPath({ testDir: __dirname });
53+
sentryTest(
54+
'should not add any part of the function identifier to beginning of filename',
55+
async ({ getLocalTestPath, page }) => {
56+
const url = await getLocalTestPath({ testDir: __dirname });
5557

56-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
58+
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
5759

58-
expect(eventData.exception?.values?.[0].stacktrace?.frames).toMatchObject(
59-
Array(7).fill({ filename: expect.stringMatching(/^file:\/?/) }),
60-
);
61-
});
60+
expect(eventData.exception?.values?.[0].stacktrace?.frames).toMatchObject(
61+
// specifically, we're trying to avoid values like `Blob@file://path/to/file` in frames with function names like `makeBlob`
62+
Array(7).fill({ filename: expect.stringMatching(/^file:\/?/) }),
63+
);
64+
},
65+
);

packages/integration-tests/suites/stacktraces/protocol_fn_identifiers/test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ sentryTest(
5050
},
5151
);
5252

53-
sentryTest('should not add any part of the function identifier inside filename', async ({ getLocalTestPath, page }) => {
54-
const url = await getLocalTestPath({ testDir: __dirname });
53+
sentryTest(
54+
'should not add any part of the function identifier to beginning of filename',
55+
async ({ getLocalTestPath, page }) => {
56+
const url = await getLocalTestPath({ testDir: __dirname });
5557

56-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
58+
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
5759

58-
expect(eventData.exception?.values?.[0].stacktrace?.frames).toMatchObject(
59-
Array(7).fill({ filename: expect.stringMatching(/^file:\/?/) }),
60-
);
61-
});
60+
expect(eventData.exception?.values?.[0].stacktrace?.frames).toMatchObject(
61+
Array(7).fill({ filename: expect.stringMatching(/^file:\/?/) }),
62+
);
63+
},
64+
);

packages/integration-tests/suites/stacktraces/regular_fn_identifiers/test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,16 @@ sentryTest(
5353
},
5454
);
5555

56-
sentryTest('should not add any part of the function identifier inside filename', async ({ getLocalTestPath, page }) => {
57-
const url = await getLocalTestPath({ testDir: __dirname });
56+
sentryTest(
57+
'should not add any part of the function identifier to beginning of filename',
58+
async ({ getLocalTestPath, page }) => {
59+
const url = await getLocalTestPath({ testDir: __dirname });
5860

59-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
61+
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
6062

61-
expect(eventData.exception?.values?.[0].stacktrace?.frames).toMatchObject(
62-
Array(8).fill({ filename: expect.stringMatching(/^file:\/?/) }),
63-
);
64-
});
63+
expect(eventData.exception?.values?.[0].stacktrace?.frames).toMatchObject(
64+
// specifically, we're trying to avoid values like `Blob@file://path/to/file` in frames with function names like `makeBlob`
65+
Array(8).fill({ filename: expect.stringMatching(/^file:\/?/) }),
66+
);
67+
},
68+
);

0 commit comments

Comments
 (0)