@@ -398,10 +398,12 @@ describe('[pre-v8]: shouldAttachHeaders', () => {
398398 const shouldAttachHeaders = makeShouldAttachHeaders ( [ 'example.com' ] , undefined ) ;
399399 expect ( shouldAttachHeaders ( 'http://example.com' ) ) . toBe ( true ) ;
400400 } ) ;
401+
401402 it ( 'should return `false` if tracePropagationTargets array is empty' , ( ) => {
402403 const shouldAttachHeaders = makeShouldAttachHeaders ( [ ] , [ 'localhost' ] ) ;
403404 expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
404405 } ) ;
406+
405407 it ( "should return `false` if tracePropagationTargets array doesn't match" , ( ) => {
406408 const shouldAttachHeaders = makeShouldAttachHeaders ( [ 'example.com' ] , [ 'localhost' ] ) ;
407409 expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
@@ -413,10 +415,12 @@ describe('[pre-v8]: shouldAttachHeaders', () => {
413415 const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , [ 'example.com' ] ) ;
414416 expect ( shouldAttachHeaders ( 'http://example.com' ) ) . toBe ( true ) ;
415417 } ) ;
418+
416419 it ( 'should return `false` if tracePropagationTargets array is empty' , ( ) => {
417420 const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , [ ] ) ;
418421 expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
419422 } ) ;
423+
420424 it ( "should return `false` if tracePropagationTargets array doesn't match" , ( ) => {
421425 const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , [ 'example.com' ] ) ;
422426 expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
@@ -433,6 +437,7 @@ describe('[pre-v8]: shouldAttachHeaders', () => {
433437 const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , undefined ) ;
434438 expect ( shouldAttachHeaders ( url ) ) . toBe ( true ) ;
435439 } ) ;
440+
436441 it . each ( [ 'notmydoman/api/test' , 'example.com' ] ) ( 'return `false` for urls not matching defaults (%s)' , url => {
437442 const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , undefined ) ;
438443 expect ( shouldAttachHeaders ( url ) ) . toBe ( false ) ;
0 commit comments