@@ -3148,6 +3148,52 @@ describe('utils', () => {
3148
3148
} ) ;
3149
3149
} ) ;
3150
3150
3151
+ describe ( 'setNetworkLogs' , ( ) => {
3152
+ it ( 'should return true if networkLogs is passed as boolean true' , ( ) => {
3153
+ let bsConfig = {
3154
+ run_settings : { networkLogs : true }
3155
+ } ;
3156
+ let expectResult = {
3157
+ run_settings : { networkLogs : 'true' }
3158
+ }
3159
+ utils . setNetworkLogs ( bsConfig ) ;
3160
+ expect ( bsConfig ) . to . be . eql ( expectResult ) ;
3161
+ } ) ;
3162
+
3163
+ it ( 'should return true if networkLogs is passed as string true' , ( ) => {
3164
+ let bsConfig = {
3165
+ run_settings : { networkLogs : "true" }
3166
+ } ;
3167
+ let expectResult = {
3168
+ run_settings : { networkLogs : "true" }
3169
+ }
3170
+ utils . setNetworkLogs ( bsConfig ) ;
3171
+ expect ( bsConfig ) . to . be . eql ( expectResult ) ;
3172
+ } ) ;
3173
+
3174
+ it ( 'should return false if networkLogs is passed as any other non true value' , ( ) => {
3175
+ let bsConfig = {
3176
+ run_settings : { networkLogs : "abc" }
3177
+ } ;
3178
+ let expectResult = {
3179
+ run_settings : { networkLogs : "false" }
3180
+ }
3181
+ utils . setNetworkLogs ( bsConfig ) ;
3182
+ expect ( bsConfig ) . to . be . eql ( expectResult ) ;
3183
+ } ) ;
3184
+
3185
+ it ( 'should return false if networkLogs is not passed' , ( ) => {
3186
+ let bsConfig = {
3187
+ run_settings : { }
3188
+ } ;
3189
+ let expectResult = {
3190
+ run_settings : { networkLogs : "false" }
3191
+ }
3192
+ utils . setNetworkLogs ( bsConfig ) ;
3193
+ expect ( bsConfig ) . to . be . eql ( expectResult ) ;
3194
+ } ) ;
3195
+ } ) ;
3196
+
3151
3197
describe ( 'isSpecTimeoutArgPassed' , ( ) => {
3152
3198
let searchForOptionStub ;
3153
3199
beforeEach ( ( ) => {
0 commit comments