@@ -513,14 +513,15 @@ test.describe('resource headers with trackResourceHeaders', () => {
513513 createTest ( 'collect default request headers for XHR when trackResourceHeaders is true' )
514514 . withRum ( TRACK_RESOURCE_HEADERS_CONFIG )
515515 . run ( async ( { intakeRegistry, flushEvents, page } ) => {
516- await page . evaluate ( ( ) =>
517- new Promise < void > ( ( resolve ) => {
518- const xhr = new XMLHttpRequest ( )
519- xhr . addEventListener ( 'loadend' , ( ) => resolve ( ) )
520- xhr . open ( 'POST' , '/ok' )
521- xhr . setRequestHeader ( 'Content-Type' , 'application/json' )
522- xhr . send ( JSON . stringify ( { key : 'value' } ) )
523- } )
516+ await page . evaluate (
517+ ( ) =>
518+ new Promise < void > ( ( resolve ) => {
519+ const xhr = new XMLHttpRequest ( )
520+ xhr . addEventListener ( 'loadend' , ( ) => resolve ( ) )
521+ xhr . open ( 'POST' , '/ok' )
522+ xhr . setRequestHeader ( 'Content-Type' , 'application/json' )
523+ xhr . send ( JSON . stringify ( { key : 'value' } ) )
524+ } )
524525 )
525526
526527 await flushEvents ( )
@@ -538,15 +539,16 @@ test.describe('resource headers with trackResourceHeaders', () => {
538539 trackResourceHeaders : [ 'x-custom-request' ] ,
539540 } )
540541 . run ( async ( { intakeRegistry, flushEvents, page } ) => {
541- await page . evaluate ( ( ) =>
542- new Promise < void > ( ( resolve ) => {
543- const xhr = new XMLHttpRequest ( )
544- xhr . addEventListener ( 'loadend' , ( ) => resolve ( ) )
545- xhr . open ( 'POST' , '/ok' )
546- xhr . setRequestHeader ( 'Content-Type' , 'application/json' )
547- xhr . setRequestHeader ( 'x-custom-request' , 'request-value' )
548- xhr . send ( JSON . stringify ( { key : 'value' } ) )
549- } )
542+ await page . evaluate (
543+ ( ) =>
544+ new Promise < void > ( ( resolve ) => {
545+ const xhr = new XMLHttpRequest ( )
546+ xhr . addEventListener ( 'loadend' , ( ) => resolve ( ) )
547+ xhr . open ( 'POST' , '/ok' )
548+ xhr . setRequestHeader ( 'Content-Type' , 'application/json' )
549+ xhr . setRequestHeader ( 'x-custom-request' , 'request-value' )
550+ xhr . send ( JSON . stringify ( { key : 'value' } ) )
551+ } )
550552 )
551553
552554 await flushEvents ( )
0 commit comments