browserstack/browserstack_local.conf.js
function () {
    require('ts-node').register({
      project: 'e2e/tsconfig.e2e.json'
    });
    console.log("Connecting local");
    return new Promise(function (resolve, reject) {
      exports.bs_local = new browserstack.Local();
      exports.bs_local.start({'key': exports.config.capabilities['browserstack.key']}, function (error) {
        if (error) return reject(error);
        console.log('Connected. Now testing...');

        resolve();
      });
    });
  }
function () {
    require('ts-node').register({
      project: 'e2e/tsconfig.e2e.json'
    });
    console.log("Connecting local");
    return new Promise(function (resolve, reject) {
      exports.bs_local = new browserstack.Local();
      exports.bs_local.start({'key': exports.config.capabilities['browserstack.key']}, function (error) {
        if (error) return reject(error);
        console.log('Connected. Now testing...');

        resolve();
      });
    });
  }
function ( ) { require ( 'ts-node' ) . register ( { project : 'e2e/tsconfig.e2e.json' } ) ; console . log ( "Connecting local" ) ; return new Promise ( function ( resolve , reject ) { exports . bs_local = new browserstack . Local ( ) ; exports . bs_local . start ( { 'key' : exports . config . capabilities [ 'browserstack.key' ] } , function ( error ) { if ( error ) return reject ( error ) ; console . log ( 'Connected. Now testing...' ) ; resolve ( ) ; } ) ; } ) ; }
Code to start browserstack local before start of test
Code to start browserstack local before start of test