@@ -131,7 +131,8 @@ describe('Tracer tests', () => {
131131 const tracer = new Tracer ( dummyServiceName , inMemSpanStore , commonTags ) ;
132132
133133 const startServerSpanFields = new StartSpanFields ( ) ;
134- const carrier = { 'Trace-ID' : 'T1' , 'Span-ID' : 'S1' , 'Parent-ID' : 'P1' , 'Baggage-myKey' : 'myVal' } ;
134+ console . log ( 'starting .....' ) ;
135+ const carrier = { 'Trace-ID' : 'T1' , 'Span-ID' : 'S1' , 'parent-id' : 'P1' , 'Baggage-myKey' : 'myVal' , 'baggage-mylowercasekey' : 'myval' } ;
135136 const clientSpanContext = tracer . extract ( opentracing . FORMAT_TEXT_MAP , carrier ) ;
136137 startServerSpanFields . childOf = clientSpanContext ;
137138 const serverSpan = tracer . startSpan ( dummyOperation , startServerSpanFields ) ;
@@ -140,10 +141,12 @@ describe('Tracer tests', () => {
140141
141142 serverSpan . finish ( ) ;
142143 expect ( inMemSpanStore . spans ( ) . length ) . equal ( 1 ) ;
143- const receviedSpan = inMemSpanStore . spans ( ) [ 0 ] ;
144- expect ( receviedSpan . context ( ) . traceId ) . eq ( 'T1' ) ;
145- expect ( receviedSpan . context ( ) . spanId === 'S1' ) . eq ( true ) ;
146- expect ( receviedSpan . context ( ) . parentSpanId ) . eq ( 'P1' ) ;
144+ const receivedSpan = inMemSpanStore . spans ( ) [ 0 ] ;
145+ expect ( receivedSpan . context ( ) . traceId ) . eq ( 'T1' ) ;
146+ expect ( receivedSpan . context ( ) . spanId === 'S1' ) . eq ( true ) ;
147+ expect ( receivedSpan . context ( ) . parentSpanId ) . eq ( 'P1' ) ;
148+ expect ( receivedSpan . context ( ) . baggage [ 'myKey' ] ) . eq ( 'myVal' ) ;
149+ expect ( receivedSpan . context ( ) . baggage [ 'mylowercasekey' ] ) . eq ( 'myval' ) ;
147150 } ) ;
148151
149152 it ( 'should create server span as a non-sharable span if tracer is in dualspan mode and context is extracted' , ( ) => {
0 commit comments