@@ -12,7 +12,7 @@ describe('Local', function () {
12
12
13
13
it ( 'should have pid when running' , function ( done ) {
14
14
this . timeout ( 600000 ) ;
15
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY } , function ( ) {
15
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY } , function ( ) {
16
16
expect ( bsLocal . tunnel . pid ) . to . not . equal ( 0 ) ;
17
17
done ( ) ;
18
18
} ) ;
@@ -21,19 +21,19 @@ describe('Local', function () {
21
21
it ( 'should return is running properly' , function ( done ) {
22
22
this . timeout ( 60000 ) ;
23
23
expect ( bsLocal . isRunning ( ) ) . to . not . equal ( true ) ;
24
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY } , function ( ) {
24
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY } , function ( ) {
25
25
expect ( bsLocal . isRunning ( ) ) . to . equal ( true ) ;
26
26
done ( ) ;
27
27
} ) ;
28
28
} ) ;
29
29
30
30
it ( 'should throw error on running multiple binary' , function ( done ) {
31
31
this . timeout ( 60000 ) ;
32
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY } , function ( ) {
32
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY } , function ( ) {
33
33
bsLocal_2 = new browserstack . Local ( ) ;
34
34
var tempLogPath = path . join ( process . cwd ( ) , 'log2.log' ) ;
35
35
try {
36
- bsLocal_2 . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , logfile : tempLogPath } , function ( ) { } ) ;
36
+ bsLocal_2 . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , '- logfile' : tempLogPath } , function ( ) { } ) ;
37
37
}
38
38
catch ( err ) {
39
39
expect ( err . toString ( ) . trim ( ) ) . to . equal ( 'LocalError: *** Error: Either another browserstack local client is running on your machine or some server is listening on port 45691' ) ;
@@ -44,71 +44,71 @@ describe('Local', function () {
44
44
} ) ;
45
45
46
46
it ( 'should enable verbose' , function ( done ) {
47
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , v : true } , function ( ) {
47
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '-v' : true } , function ( ) {
48
48
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-vvv' ) ) . to . not . equal ( - 1 ) ;
49
49
done ( ) ;
50
50
} ) ;
51
51
} ) ;
52
52
53
53
it ( 'should set folder testing' , function ( done ) {
54
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , f : '/var/html' } , function ( ) {
54
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '-f' : '/var/html' } , function ( ) {
55
55
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-f' ) ) . to . not . equal ( - 1 ) ;
56
56
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '/var/html' ) ) . to . not . equal ( - 1 ) ;
57
57
done ( ) ;
58
58
} ) ;
59
59
} ) ;
60
60
61
61
it ( 'should enable force' , function ( done ) {
62
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , force : true } , function ( ) {
62
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '- force' : true } , function ( ) {
63
63
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-force' ) ) . to . not . equal ( - 1 ) ;
64
64
done ( ) ;
65
65
} ) ;
66
66
} ) ;
67
67
68
68
it ( 'should enable only' , function ( done ) {
69
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , only : true } , function ( ) {
69
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '- only' : true } , function ( ) {
70
70
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-only' ) ) . to . not . equal ( - 1 ) ;
71
71
done ( ) ;
72
72
} ) ;
73
73
} ) ;
74
74
75
75
it ( 'should enable onlyAutomate' , function ( done ) {
76
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , onlyAutomate : true } , function ( ) {
76
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '- onlyAutomate' : true } , function ( ) {
77
77
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-onlyAutomate' ) ) . to . not . equal ( - 1 ) ;
78
78
done ( ) ;
79
79
} ) ;
80
80
} ) ;
81
81
82
82
it ( 'should enable forcelocal' , function ( done ) {
83
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , forcelocal : true } , function ( ) {
83
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '- forcelocal' : true } , function ( ) {
84
84
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-forcelocal' ) ) . to . not . equal ( - 1 ) ;
85
85
done ( ) ;
86
86
} ) ;
87
87
} ) ;
88
88
89
89
it ( 'should enable forceproxy' , function ( done ) {
90
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , forceproxy : true } , function ( ) {
90
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '- forceproxy' : true } , function ( ) {
91
91
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-forceproxy' ) ) . to . not . equal ( - 1 ) ;
92
92
done ( ) ;
93
93
} ) ;
94
94
} ) ;
95
95
96
96
97
97
it ( 'should set localIdentifier' , function ( done ) {
98
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , localIdentifier : 'abcdef' } , function ( ) {
98
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '- localIdentifier' : 'abcdef' } , function ( ) {
99
99
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-localIdentifier abcdef' ) ) . to . not . equal ( - 1 ) ;
100
100
done ( ) ;
101
101
} ) ;
102
102
} ) ;
103
103
104
104
it ( 'should set proxy' , function ( done ) {
105
105
bsLocal . start ( {
106
- key : process . env . BROWSERSTACK_ACCESS_KEY ,
106
+ '- key' : process . env . BROWSERSTACK_ACCESS_KEY ,
107
107
onlyCommand : true ,
108
- proxyHost : 'localhost' ,
109
- proxyPort : 8080 ,
110
- proxyUser : 'user' ,
111
- proxyPass : 'pass'
108
+ '- proxyHost' : 'localhost' ,
109
+ '- proxyPort' : 8080 ,
110
+ '- proxyUser' : 'user' ,
111
+ '- proxyPass' : 'pass'
112
112
} , function ( ) {
113
113
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-proxyHost localhost' ) ) . to . not . equal ( - 1 ) ;
114
114
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( '-proxyPort 8080' ) ) . to . not . equal ( - 1 ) ;
@@ -119,7 +119,7 @@ describe('Local', function () {
119
119
} ) ;
120
120
121
121
it ( 'should set hosts' , function ( done ) {
122
- bsLocal . start ( { key : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , hosts : 'localhost,8000,0' } , function ( ) {
122
+ bsLocal . start ( { '- key' : process . env . BROWSERSTACK_ACCESS_KEY , onlyCommand : true , '- hosts' : 'localhost,8000,0' } , function ( ) {
123
123
expect ( bsLocal . getBinaryArgs ( ) . indexOf ( 'localhost,8000,0' ) ) . to . not . equal ( - 1 ) ;
124
124
done ( ) ;
125
125
} ) ;
0 commit comments