@@ -357,24 +357,33 @@ describe('BrowserTracing', () => {
357
357
} ) ;
358
358
} ) ;
359
359
360
- describe ( 'sentry-trace <meta> element' , ( ) => {
361
- describe ( 'getMetaContent' , ( ) => {
362
- it ( 'finds the specified tag and extracts the value' , ( ) => {
363
- const name = 'sentry-trace' ;
364
- const content = '126de09502ae4e0fb26c6967190756a4-b6e54397b12a2a0f-1' ;
365
- document . head . innerHTML = `<meta name="${ name } " content="${ content } ">` ;
366
-
367
- const metaTagValue = getMetaContent ( name ) ;
368
- expect ( metaTagValue ) . toBe ( content ) ;
369
- } ) ;
360
+ describe ( 'sentry-trace <meta> element' , ( ) => {
361
+ describe ( 'getMetaContent' , ( ) => {
362
+ it ( 'finds the specified tag and extracts the value' , ( ) => {
363
+ const name = 'sentry-trace' ;
364
+ const content = '126de09502ae4e0fb26c6967190756a4-b6e54397b12a2a0f-1' ;
365
+ document . head . innerHTML = `<meta name="${ name } " content="${ content } ">` ;
370
366
371
- it ( "doesn't return meta tags other than the one specified" , ( ) => {
372
- document . head . innerHTML = `<meta name="cat-cafe">` ;
367
+ const metaTagValue = getMetaContent ( name ) ;
368
+ expect ( metaTagValue ) . toBe ( content ) ;
369
+ } ) ;
373
370
374
- const metaTagValue = getMetaContent ( 'dogpark' ) ;
375
- expect ( metaTagValue ) . toBe ( null ) ;
376
- } ) ;
371
+ it ( "doesn't return meta tags other than the one specified" , ( ) => {
372
+ document . head . innerHTML = `<meta name="cat-cafe">` ;
373
+
374
+ const metaTagValue = getMetaContent ( 'dogpark' ) ;
375
+ expect ( metaTagValue ) . toBe ( null ) ;
376
+ } ) ;
377
+
378
+ it ( 'can pick the correct tag out of multiple options' , ( ) => {
379
+ const name = 'sentry-trace' ;
380
+ const content = '126de09502ae4e0fb26c6967190756a4-b6e54397b12a2a0f-1' ;
381
+ const sentryTraceMeta = `<meta name="${ name } " content="${ content } ">` ;
382
+ const otherMeta = `<meta name="cat-cafe">` ;
383
+ document . head . innerHTML = `${ sentryTraceMeta } ${ otherMeta } ` ;
377
384
385
+ const metaTagValue = getMetaContent ( name ) ;
386
+ expect ( metaTagValue ) . toBe ( content ) ;
378
387
} ) ;
379
388
} ) ;
380
389
} ) ;
0 commit comments