Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ function createCredentialPreprocessor() {
// This will affect the generated (ES5) JS
const regionCode = `var defaultRegion = '${region}';`
const credentialsCode = `var credentials = ${JSON.stringify(credentials)};`
// See: https://github.com/aws/aws-sdk-js-v3/issues/5890
const expirationNeedsToBeDate = `credentials.expiration = new Date(credentials.expiration);`
const isBrowser = `var isBrowser = true;`
const contents = content.split('\n')
let idx = -1
Expand All @@ -137,7 +139,7 @@ function createCredentialPreprocessor() {
break
}
}
contents.splice(idx + 1, 0, regionCode, credentialsCode, isBrowser)
contents.splice(idx + 1, 0, regionCode, credentialsCode, expirationNeedsToBeDate, isBrowser)
done(contents.join('\n'))
}
}