Skip to content

Commit c7d84f0

Browse files
authored
Merge branch 'master' into seebees/fix-expiration-in-integration-browser
2 parents 3334e3b + 25f9610 commit c7d84f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

karma.conf.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ function createCredentialPreprocessor() {
127127
// This will affect the generated (ES5) JS
128128
const regionCode = `var defaultRegion = '${region}';`
129129
const credentialsCode = `var credentials = ${JSON.stringify(credentials)};`
130+
// See: https://github.com/aws/aws-sdk-js-v3/issues/5890
131+
const expirationNeedsToBeDate = `credentials.expiration = new Date(credentials.expiration);`
130132
const isBrowser = `var isBrowser = true;`
131133
const contents = content.split('\n')
132134
let idx = -1
@@ -137,7 +139,7 @@ function createCredentialPreprocessor() {
137139
break
138140
}
139141
}
140-
contents.splice(idx + 1, 0, regionCode, credentialsCode, isBrowser)
142+
contents.splice(idx + 1, 0, regionCode, credentialsCode, expirationNeedsToBeDate, isBrowser)
141143
done(contents.join('\n'))
142144
}
143145
}

0 commit comments

Comments
 (0)