@@ -19,13 +19,15 @@ describe('executionContextMiddleware', () => {
1919 const testSpanId = '123' ;
2020 const testTrace = 'testtrace' ;
2121 const validExecutionId = 'xn1h9xdgv6zw' ;
22- const headers = {
23- 'X-Cloud-Trace-Context' : `${ testTrace } /${ testSpanId } ;o=1` ,
24- 'function-execution-id' : validExecutionId ,
25- } ;
2622
2723 it ( 'uses execution ID in header' , ( ) => {
28- const req = createRequest ( { } , headers ) ;
24+ const req = createRequest (
25+ { } ,
26+ {
27+ 'X-Cloud-Trace-Context' : `${ testTrace } /${ testSpanId } ;o=1` ,
28+ 'function-execution-id' : validExecutionId ,
29+ }
30+ ) ;
2931
3032 executionContextMiddleware ( req as Request , { } as Response , next ) ;
3133
@@ -34,7 +36,10 @@ describe('executionContextMiddleware', () => {
3436 } ) ;
3537
3638 it ( 'generates execution ID if not in header' , ( ) => {
37- const req = createRequest ( { } , headers ) ;
39+ const req = createRequest (
40+ { } ,
41+ { 'X-Cloud-Trace-Context' : `${ testTrace } /${ testSpanId } ` }
42+ ) ;
3843
3944 executionContextMiddleware ( req as Request , { } as Response , next ) ;
4045
0 commit comments