Skip to content

Commit 9892220

Browse files
committed
chore: update karma config
The config was in a tenuous state functioning. Changing the config to the root Typescript config file that references each module, and enabling projectReferences make the configuration explicit. Also adding a log for errors such as when AWS credentials are not available makes this error much more obvious.
1 parent 3e6c074 commit 9892220

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

karma.conf.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
// Karma configuration
22

33
module.exports = function (config) {
4+
5+
process.on('infrastructure_error', (error) => {
6+
/* @aws-sdk/karma-credential-loader get credential
7+
* as configured by the AWS SDK.
8+
* These credentials are used to test KMS integration
9+
* with the Encryption SDK.
10+
* If they do not exist, then karma will exit with an `UnhandledRejection`.
11+
* The following will log errors link this,
12+
* but still let the karma-server shut down.
13+
*/
14+
console.error('infrastructure_error', error);
15+
})
16+
417
config.set({
518
basePath: '',
619
frameworks: ['mocha', 'chai'],
@@ -25,10 +38,9 @@ module.exports = function (config) {
2538
{
2639
loader: 'ts-loader',
2740
options: {
28-
configFile: 'tsconfig.module.json',
29-
compilerOptions: {
30-
sourceRoot: 'modules/'
31-
}
41+
logInfoToStdOut: true,
42+
projectReferences: true,
43+
configFile: `${__dirname}/tsconfig.module.json`
3244
}
3345
}
3446
],

0 commit comments

Comments
 (0)