@@ -58,7 +58,7 @@ describe('OTLPAwsSpanExporter', () => {
5858 sandbox . restore ( ) ;
5959 } ) ;
6060
61- it ( 'Should inject SigV4 Headers successfully' , ( ) => {
61+ it ( 'Should inject SigV4 Headers successfully' , async ( ) => {
6262 const exporter = new mockModule . OTLPAwsSpanExporter ( XRAY_OTLP_ENDPOINT + '/v1/traces' ) ;
6363
6464 scope . on ( 'request' , ( req , interceptor , body ) => {
@@ -75,7 +75,7 @@ describe('OTLPAwsSpanExporter', () => {
7575 expect ( headers [ 'user-agent' ] ) . toMatch ( / ^ O T e l - O T L P - E x p o r t e r - J a v a S c r i p t \/ \d + \. \d + \. \d + $ / ) ;
7676 } ) ;
7777
78- exporter . export ( [ ] , ( ) => { } ) ;
78+ await exporter . export ( [ ] , ( ) => { } ) ;
7979 } ) ;
8080
8181 describe ( 'Should not inject SigV4 headers if dependencies are missing' , ( ) => {
@@ -87,7 +87,7 @@ describe('OTLPAwsSpanExporter', () => {
8787 ] ;
8888
8989 dependencies . forEach ( dependency => {
90- it ( `should not sign headers if missing dependency: ${ dependency } ` , ( ) => {
90+ it ( `should not sign headers if missing dependency: ${ dependency } ` , async ( ) => {
9191 const exporter = new OTLPAwsSpanExporter ( XRAY_OTLP_ENDPOINT + '/v1/traces' ) ;
9292
9393 scope . on ( 'request' , ( req , interceptor , body ) => {
@@ -107,7 +107,7 @@ describe('OTLPAwsSpanExporter', () => {
107107 requireStub . withArgs ( dependency ) . throws ( new Error ( `Cannot find module '${ dependency } '` ) ) ;
108108 requireStub . callThrough ( ) ;
109109
110- exporter . export ( [ ] , ( ) => { } ) ;
110+ await exporter . export ( [ ] , ( ) => { } ) ;
111111 } ) ;
112112 } ) ;
113113 } ) ;
@@ -135,7 +135,7 @@ describe('OTLPAwsSpanExporter', () => {
135135
136136 const exporter = new stubbedModule . OTLPAwsSpanExporter ( XRAY_OTLP_ENDPOINT ) ;
137137
138- exporter . export ( [ ] , ( ) => { } ) ;
138+ await exporter . export ( [ ] , ( ) => { } ) ;
139139 } ) ;
140140
141141 it ( 'should not inject SigV4 headers if failure to retrieve credentials' , async ( ) => {
@@ -159,6 +159,6 @@ describe('OTLPAwsSpanExporter', () => {
159159
160160 const exporter = new stubbedModule . OTLPAwsSpanExporter ( XRAY_OTLP_ENDPOINT ) ;
161161
162- exporter . export ( [ ] , ( ) => { } ) ;
162+ await exporter . export ( [ ] , ( ) => { } ) ;
163163 } ) ;
164164} ) ;
0 commit comments