File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
aws-distro-opentelemetry-node-autoinstrumentation/test/exporter/otlp/aws/common Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -154,19 +154,18 @@ describe('AwsAuthenticator', () => {
154154 notExpected ,
155155 new Uint8Array ( )
156156 ) ;
157+ expect ( result ) . toHaveProperty ( AUTHORIZATION_HEADER ) ;
158+ expect ( result ) . toHaveProperty ( X_AMZ_DATE_HEADER ) ;
159+ expect ( result ) . toHaveProperty ( X_AMZ_SECURITY_TOKEN_HEADER ) ;
157160
158161 if ( version >= 16 ) {
159- expect ( result ) . toHaveProperty ( AUTHORIZATION_HEADER ) ;
160- expect ( result ) . toHaveProperty ( X_AMZ_DATE_HEADER ) ;
161- expect ( result ) . toHaveProperty ( X_AMZ_SECURITY_TOKEN_HEADER ) ;
162-
163162 expect ( result [ AUTHORIZATION_HEADER ] ) . toBe ( expected [ AUTHORIZATION_HEADER ] ) ;
164163 expect ( result [ X_AMZ_DATE_HEADER ] ) . toBe ( expected [ X_AMZ_DATE_HEADER ] ) ;
165164 expect ( result [ X_AMZ_SECURITY_TOKEN_HEADER ] ) . toBe ( expected [ X_AMZ_SECURITY_TOKEN_HEADER ] ) ;
166165 } else {
167- expect ( result ) . not . toHaveProperty ( AUTHORIZATION_HEADER ) ;
168- expect ( result ) . not . toHaveProperty ( X_AMZ_DATE_HEADER ) ;
169- expect ( result ) . not . toHaveProperty ( X_AMZ_SECURITY_TOKEN_HEADER ) ;
166+ expect ( result [ AUTHORIZATION_HEADER ] ) . toBe ( notExpected [ AUTHORIZATION_HEADER ] ) ;
167+ expect ( result [ X_AMZ_DATE_HEADER ] ) . toBe ( notExpected [ X_AMZ_DATE_HEADER ] ) ;
168+ expect ( result [ X_AMZ_SECURITY_TOKEN_HEADER ] ) . toBe ( notExpected [ X_AMZ_SECURITY_TOKEN_HEADER ] ) ;
170169 }
171170 } ) ;
172171} ) ;
You can’t perform that action at this time.
0 commit comments