@@ -398,10 +398,12 @@ describe('[pre-v8]: shouldAttachHeaders', () => {
398
398
const shouldAttachHeaders = makeShouldAttachHeaders ( [ 'example.com' ] , undefined ) ;
399
399
expect ( shouldAttachHeaders ( 'http://example.com' ) ) . toBe ( true ) ;
400
400
} ) ;
401
+
401
402
it ( 'should return `false` if tracePropagationTargets array is empty' , ( ) => {
402
403
const shouldAttachHeaders = makeShouldAttachHeaders ( [ ] , [ 'localhost' ] ) ;
403
404
expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
404
405
} ) ;
406
+
405
407
it ( "should return `false` if tracePropagationTargets array doesn't match" , ( ) => {
406
408
const shouldAttachHeaders = makeShouldAttachHeaders ( [ 'example.com' ] , [ 'localhost' ] ) ;
407
409
expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
@@ -413,10 +415,12 @@ describe('[pre-v8]: shouldAttachHeaders', () => {
413
415
const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , [ 'example.com' ] ) ;
414
416
expect ( shouldAttachHeaders ( 'http://example.com' ) ) . toBe ( true ) ;
415
417
} ) ;
418
+
416
419
it ( 'should return `false` if tracePropagationTargets array is empty' , ( ) => {
417
420
const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , [ ] ) ;
418
421
expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
419
422
} ) ;
423
+
420
424
it ( "should return `false` if tracePropagationTargets array doesn't match" , ( ) => {
421
425
const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , [ 'example.com' ] ) ;
422
426
expect ( shouldAttachHeaders ( 'http://localhost:3000/test' ) ) . toBe ( false ) ;
@@ -433,6 +437,7 @@ describe('[pre-v8]: shouldAttachHeaders', () => {
433
437
const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , undefined ) ;
434
438
expect ( shouldAttachHeaders ( url ) ) . toBe ( true ) ;
435
439
} ) ;
440
+
436
441
it . each ( [ 'notmydoman/api/test' , 'example.com' ] ) ( 'return `false` for urls not matching defaults (%s)' , url => {
437
442
const shouldAttachHeaders = makeShouldAttachHeaders ( undefined , undefined ) ;
438
443
expect ( shouldAttachHeaders ( url ) ) . toBe ( false ) ;
0 commit comments