@@ -105,7 +105,7 @@ describe("utils", () => {
105105 "parallels" : 10 ,
106106 }
107107 } ;
108- utils . setParallels ( bsConfig , { parallels : 100 } ) ;
108+ utils . setParallels ( bsConfig , { parallels : 100 } ) ;
109109 expect ( bsConfig [ 'run_settings' ] [ 'parallels' ] ) . to . be . eq ( 100 ) ;
110110 } ) ;
111111
@@ -115,7 +115,7 @@ describe("utils", () => {
115115 "parallels" : 10 ,
116116 }
117117 } ;
118- utils . setParallels ( bsConfig , { parallels : undefined } ) ;
118+ utils . setParallels ( bsConfig , { parallels : undefined } ) ;
119119 expect ( bsConfig [ 'run_settings' ] [ 'parallels' ] ) . to . be . eq ( 10 ) ;
120120 } ) ;
121121 } ) ;
@@ -126,8 +126,8 @@ describe("utils", () => {
126126 } ) ;
127127
128128 it ( `should return value depending on validation messages` , ( ) => {
129- expect ( utils . getErrorCodeFromErr ( { "code" : "SyntaxError" } ) ) . to . eq ( "bstack_json_parse_error" ) ;
130- expect ( utils . getErrorCodeFromErr ( { "code" : "EACCES" } ) ) . to . eq ( "bstack_json_no_permission" ) ;
129+ expect ( utils . getErrorCodeFromErr ( { "code" : "SyntaxError" } ) ) . to . eq ( "bstack_json_parse_error" ) ;
130+ expect ( utils . getErrorCodeFromErr ( { "code" : "EACCES" } ) ) . to . eq ( "bstack_json_no_permission" ) ;
131131 } ) ;
132132 } ) ;
133133
@@ -139,15 +139,15 @@ describe("utils", () => {
139139
140140 describe ( "validateBstackJson" , ( ) => {
141141 it ( "should reject with SyntaxError for empty file" , ( ) => {
142- let bsConfigPath = path . join ( process . cwd ( ) , 'test' , 'test_files' , 'dummy_bstack.json' ) ;
142+ let bsConfigPath = path . join ( process . cwd ( ) , 'test' , 'test_files' , 'dummy_bstack.json' ) ;
143143 expect ( utils . validateBstackJson ( bsConfigPath ) ) . to . be . rejectedWith ( SyntaxError ) ;
144144 } ) ;
145145 it ( "should resolve with data for valid json" , ( ) => {
146- let bsConfigPath = path . join ( process . cwd ( ) , 'test' , 'test_files' , 'dummy_bstack_2.json' ) ;
146+ let bsConfigPath = path . join ( process . cwd ( ) , 'test' , 'test_files' , 'dummy_bstack_2.json' ) ;
147147 expect ( utils . validateBstackJson ( bsConfigPath ) ) . to . be . eventually . eql ( { } ) ;
148148 } ) ;
149149 it ( "should reject with SyntaxError for invalid json file" , ( ) => {
150- let bsConfigPath = path . join ( process . cwd ( ) , 'test' , 'test_files' , 'dummy_bstack_3.json' ) ;
150+ let bsConfigPath = path . join ( process . cwd ( ) , 'test' , 'test_files' , 'dummy_bstack_3.json' ) ;
151151 expect ( utils . validateBstackJson ( bsConfigPath ) ) . to . be . rejectedWith ( SyntaxError ) ;
152152 } ) ;
153153 } ) ;
@@ -271,18 +271,18 @@ describe("utils", () => {
271271 fs . unlink . restore ( ) ;
272272 } ) ;
273273 } ) ;
274-
274+
275275 describe ( "isCypressProjDirValid" , ( ) => {
276- it ( "should return true when cypressDir and cypressProjDir is same" , ( ) => {
277- expect ( utils . isCypressProjDirValid ( "/absolute/path" , "/absolute/path" ) ) . to . be . true ;
276+ it ( "should return true when cypressDir and cypressProjDir is same" , ( ) => {
277+ expect ( utils . isCypressProjDirValid ( "/absolute/path" , "/absolute/path" ) ) . to . be . true ;
278278 } ) ;
279279
280- it ( "should return true when cypressProjDir is child directory of cypressDir" , ( ) => {
281- expect ( utils . isCypressProjDirValid ( "/absolute/path" , "/absolute/path/childpath" ) ) . to . be . true ;
280+ it ( "should return true when cypressProjDir is child directory of cypressDir" , ( ) => {
281+ expect ( utils . isCypressProjDirValid ( "/absolute/path" , "/absolute/path/childpath" ) ) . to . be . true ;
282282 } ) ;
283283
284- it ( "should return false when cypressProjDir is not child directory of cypressDir" , ( ) => {
285- expect ( utils . isCypressProjDirValid ( "/absolute/path" , "/absolute" ) ) . to . be . false ;
284+ it ( "should return false when cypressProjDir is not child directory of cypressDir" , ( ) => {
285+ expect ( utils . isCypressProjDirValid ( "/absolute/path" , "/absolute" ) ) . to . be . false ;
286286 } ) ;
287287 } ) ;
288288
@@ -296,14 +296,14 @@ describe("utils", () => {
296296 } ) ;
297297
298298 it ( "should return false if connectionSettings.local is false" , ( ) => {
299- expect ( utils . getLocalFlag ( { "local" : false } ) ) . to . be . false ;
299+ expect ( utils . getLocalFlag ( { "local" : false } ) ) . to . be . false ;
300300 } ) ;
301301
302302 it ( "should return true if connectionSettings.local is true" , ( ) => {
303- expect ( utils . getLocalFlag ( { "local" : true } ) ) . to . be . true ;
303+ expect ( utils . getLocalFlag ( { "local" : true } ) ) . to . be . true ;
304304 } ) ;
305305 } ) ;
306-
306+
307307 describe ( "setLocal" , ( ) => {
308308 beforeEach ( function ( ) {
309309 delete process . env . BROWSERSTACK_LOCAL ;
@@ -408,34 +408,34 @@ describe("utils", () => {
408408 delete process . env . BROWSERSTACK_USERNAME ;
409409 } ) ;
410410
411- it ( "should set username if args.username is present" , ( ) => {
411+ it ( "should set username if args.username is present" , ( ) => {
412412 let bsConfig = {
413413 auth : {
414414 username : "test"
415415 }
416416 }
417- utils . setUsername ( bsConfig , { username : "username" } ) ;
417+ utils . setUsername ( bsConfig , { username : "username" } ) ;
418418 expect ( bsConfig . auth . username ) . to . be . eq ( "username" ) ;
419419 } ) ;
420420
421- it ( "should set username if process.env.BROWSERSTACK_USERNAME is present and args.username is not present" , ( ) => {
421+ it ( "should set username if process.env.BROWSERSTACK_USERNAME is present and args.username is not present" , ( ) => {
422422 let bsConfig = {
423423 auth : {
424424 username : "test"
425425 }
426426 }
427427 process . env . BROWSERSTACK_USERNAME = "username"
428- utils . setUsername ( bsConfig , { } ) ;
428+ utils . setUsername ( bsConfig , { } ) ;
429429 expect ( bsConfig . auth . username ) . to . be . eq ( "username" ) ;
430430 } ) ;
431431
432- it ( "should set username to default if process.env.BROWSERSTACK_USERNAME and args.username is not present" , ( ) => {
432+ it ( "should set username to default if process.env.BROWSERSTACK_USERNAME and args.username is not present" , ( ) => {
433433 let bsConfig = {
434434 auth : {
435435 username : "test"
436436 }
437437 }
438- utils . setUsername ( bsConfig , { } ) ;
438+ utils . setUsername ( bsConfig , { } ) ;
439439 expect ( bsConfig . auth . username ) . to . be . eq ( "test" ) ;
440440 } ) ;
441441
@@ -450,34 +450,34 @@ describe("utils", () => {
450450 delete process . env . BROWSERSTACK_ACCESS_KEY ;
451451 } ) ;
452452
453- it ( "should set access_key if args.key is present" , ( ) => {
453+ it ( "should set access_key if args.key is present" , ( ) => {
454454 let bsConfig = {
455455 auth : {
456456 access_key : "test"
457457 }
458458 }
459- utils . setAccessKey ( bsConfig , { key : "access_key" } ) ;
459+ utils . setAccessKey ( bsConfig , { key : "access_key" } ) ;
460460 expect ( bsConfig . auth . access_key ) . to . be . eq ( "access_key" ) ;
461461 } ) ;
462462
463- it ( "should set access_key if process.env.BROWSERSTACK_ACCESS_KEY is present and args.access_key is not present" , ( ) => {
463+ it ( "should set access_key if process.env.BROWSERSTACK_ACCESS_KEY is present and args.access_key is not present" , ( ) => {
464464 let bsConfig = {
465465 auth : {
466466 access_key : "test"
467467 }
468468 }
469469 process . env . BROWSERSTACK_ACCESS_KEY = "access_key"
470- utils . setAccessKey ( bsConfig , { } ) ;
470+ utils . setAccessKey ( bsConfig , { } ) ;
471471 expect ( bsConfig . auth . access_key ) . to . be . eq ( "access_key" ) ;
472472 } ) ;
473473
474- it ( "should set access_key to default if process.env.BROWSERSTACK_ACCESS_KEY and args.access_key is not present" , ( ) => {
474+ it ( "should set access_key to default if process.env.BROWSERSTACK_ACCESS_KEY and args.access_key is not present" , ( ) => {
475475 let bsConfig = {
476476 auth : {
477477 access_key : "test"
478478 }
479479 }
480- utils . setAccessKey ( bsConfig , { } ) ;
480+ utils . setAccessKey ( bsConfig , { } ) ;
481481 expect ( bsConfig . auth . access_key ) . to . be . eq ( "test" ) ;
482482 } ) ;
483483
0 commit comments