File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const fileHelpers = require("../helpers/fileHelpers"),
8
8
9
9
module . exports = function init ( args ) {
10
10
if ( args . p ) {
11
- var path_to_bsconf = args . p + "/browserstack.json" ;
11
+ var path_to_bsconf = path . join ( args . p + "/browserstack.json" ) ;
12
12
} else {
13
13
var path_to_bsconf = "./browserstack.json" ;
14
14
}
Original file line number Diff line number Diff line change 1
1
const chai = require ( "chai" ) ,
2
2
sinon = require ( "sinon" ) ,
3
- chaiAsPromised = require ( "chai-as-promised" ) ;
3
+ chaiAsPromised = require ( "chai-as-promised" ) ,
4
+ util = require ( "util" ) ;
4
5
5
6
const Constants = require ( "../../../../bin/helpers/constants" ) ,
6
7
logger = require ( "../../../../bin/helpers/logger" ) . winstonLogger ,
@@ -32,6 +33,9 @@ describe("init", () => {
32
33
it ( "fail if given path is not present" , ( ) => {
33
34
dirExistsStub = sandbox . stub ( ) . yields ( false ) ;
34
35
writeStub = sandbox . stub ( ) ;
36
+ formatStub = sandbox . stub ( ) . callsFake ( function ( args ) {
37
+ return args ;
38
+ } ) ;
35
39
36
40
const init = proxyquire ( "../../../../bin/commands/init" , {
37
41
"../helpers/utils" : {
@@ -41,6 +45,9 @@ describe("init", () => {
41
45
dirExists : dirExistsStub ,
42
46
write : writeStub ,
43
47
} ,
48
+ "util" : {
49
+ format : formatStub
50
+ }
44
51
} ) ;
45
52
46
53
init ( args ) ;
You can’t perform that action at this time.
0 commit comments