File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 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"),
88
99module . exports = function init ( args ) {
1010 if ( args . p ) {
11- var path_to_bsconf = args . p + "/browserstack.json" ;
11+ var path_to_bsconf = path . join ( args . p + "/browserstack.json" ) ;
1212 } else {
1313 var path_to_bsconf = "./browserstack.json" ;
1414 }
Original file line number Diff line number Diff line change 11const chai = require ( "chai" ) ,
22 sinon = require ( "sinon" ) ,
3- chaiAsPromised = require ( "chai-as-promised" ) ;
3+ chaiAsPromised = require ( "chai-as-promised" ) ,
4+ util = require ( "util" ) ;
45
56const Constants = require ( "../../../../bin/helpers/constants" ) ,
67 logger = require ( "../../../../bin/helpers/logger" ) . winstonLogger ,
@@ -32,6 +33,9 @@ describe("init", () => {
3233 it ( "fail if given path is not present" , ( ) => {
3334 dirExistsStub = sandbox . stub ( ) . yields ( false ) ;
3435 writeStub = sandbox . stub ( ) ;
36+ formatStub = sandbox . stub ( ) . callsFake ( function ( args ) {
37+ return args ;
38+ } ) ;
3539
3640 const init = proxyquire ( "../../../../bin/commands/init" , {
3741 "../helpers/utils" : {
@@ -41,6 +45,9 @@ describe("init", () => {
4145 dirExists : dirExistsStub ,
4246 write : writeStub ,
4347 } ,
48+ "util" : {
49+ format : formatStub
50+ }
4451 } ) ;
4552
4653 init ( args ) ;
You can’t perform that action at this time.
0 commit comments