File tree Expand file tree Collapse file tree 3 files changed +32
-21
lines changed
packages/integration-tests/suites/stacktraces
protocol_containing_fn_identifiers Expand file tree Collapse file tree 3 files changed +32
-21
lines changed Original file line number Diff line number Diff 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 ( / ^ f i l e : \/ ? / ) } ) ,
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 ( / ^ f i l e : \/ ? / ) } ) ,
63+ ) ;
64+ } ,
65+ ) ;
Original file line number Diff line number Diff 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 ( / ^ f i l e : \/ ? / ) } ) ,
60- ) ;
61- } ) ;
60+ expect ( eventData . exception ?. values ?. [ 0 ] . stacktrace ?. frames ) . toMatchObject (
61+ Array ( 7 ) . fill ( { filename : expect . stringMatching ( / ^ f i l e : \/ ? / ) } ) ,
62+ ) ;
63+ } ,
64+ ) ;
Original file line number Diff line number Diff 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 ( / ^ f i l e : \/ ? / ) } ) ,
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 ( / ^ f i l e : \/ ? / ) } ) ,
66+ ) ;
67+ } ,
68+ ) ;
You can’t perform that action at this time.
0 commit comments