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(
50
50
} ,
51
51
) ;
52
52
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 } ) ;
55
57
56
- const eventData = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
58
+ const eventData = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
57
59
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(
50
50
} ,
51
51
) ;
52
52
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 } ) ;
55
57
56
- const eventData = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
58
+ const eventData = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
57
59
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(
53
53
} ,
54
54
) ;
55
55
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 } ) ;
58
60
59
- const eventData = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
61
+ const eventData = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
60
62
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