File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,12 @@ exports.setDefaults = (bsConfig, args) => {
158
158
if ( bsConfig . run_settings && this . isUndefined ( bsConfig . run_settings . npm_dependencies ) ) {
159
159
bsConfig . run_settings . npm_dependencies = { }
160
160
}
161
+
162
+ // setting connection_settings to {} if not present
163
+ if ( this . isUndefined ( bsConfig . connection_settings ) ) {
164
+ bsConfig . connection_settings = { } ;
165
+ }
166
+
161
167
}
162
168
163
169
exports . setUsername = ( bsConfig , args ) => {
Original file line number Diff line number Diff line change @@ -1428,6 +1428,23 @@ describe('utils', () => {
1428
1428
expect ( utils . isUndefined ( bsConfig . auth ) ) . to . be . true ;
1429
1429
expect ( utils . isUndefined ( bsConfig . run_settings . npm_dependencies ) ) . to . be . false ;
1430
1430
} ) ;
1431
+
1432
+ it ( 'should set connection_settings if bsConfig.connection_settings is undefined' , ( ) => {
1433
+ let bsConfig = { run_settings : { } } ;
1434
+ utils . setDefaults ( bsConfig , { } ) ;
1435
+ expect ( utils . isUndefined ( bsConfig . connection_settings ) ) . to . be . false ;
1436
+ } ) ;
1437
+
1438
+ it ( 'should not set connection_settings if bsConfig.connection_settings is defined ' , ( ) => {
1439
+ let bsConfig = {
1440
+ run_settings : { } ,
1441
+ connection_settings : {
1442
+ local : "false"
1443
+ }
1444
+ } ;
1445
+ utils . setDefaults ( bsConfig , { } ) ;
1446
+ expect ( bsConfig . connection_settings ) . to . deep . equal ( { local : "false" } ) ;
1447
+ } ) ;
1431
1448
} ) ;
1432
1449
1433
1450
describe ( 'getNumberOfSpecFiles' , ( ) => {
You can’t perform that action at this time.
0 commit comments