Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserstack-cypress-cli

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserstack-cypress-cli - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

20

bin/helpers/utils.js

@@ -161,2 +161,8 @@ "use strict";

}
// setting connection_settings to {} if not present
if (this.isUndefined(bsConfig.connection_settings)) {
bsConfig.connection_settings = {};
}
}

@@ -268,3 +274,3 @@

exports.getUserAgent = () => {
return `BStack-Cypress-CLI/1.8.0 (${os.arch()}/${os.platform()}/${os.release()})`;
return `BStack-Cypress-CLI/1.8.1 (${os.arch()}/${os.platform()}/${os.release()})`;
};

@@ -334,3 +340,2 @@

exports.setLocal = (bsConfig, args) => {
let localInferred = !(this.searchForOption('--local-mode'));
if (!this.isUndefined(args.local)) {

@@ -351,8 +356,15 @@ let local = false;

);
} else if (!this.isUndefined(bsConfig['connection_settings']['local'])) {
let local = false;
if (String(bsConfig['connection_settings']['local']).toLowerCase() === 'true') {
local = true;
}
bsConfig['connection_settings']['local'] = local;
} else if (
this.isUndefined(bsConfig['connection_settings']['local']) &&
( !this.isUndefined(args.localMode) || !this.isUndefined(bsConfig['connection_settings']['local_mode']) )
(!this.isUndefined(args.localMode) ||
!this.isUndefined(bsConfig['connection_settings']['local_mode']))
) {
bsConfig['connection_settings']['local'] = true;
bsConfig.connection_settings.local_inferred = localInferred;
bsConfig.connection_settings.local_inferred = true;
}

@@ -359,0 +371,0 @@ };

2

package.json
{
"name": "browserstack-cypress-cli",
"version": "1.8.0",
"version": "1.8.1",
"description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -679,3 +679,3 @@ 'use strict';

it('bsconfig connection_settings local_inferred as true if serachforOption returns false with args local-mode true', () => {
it('bsconfig connection_settings local_inferred as true if args local-mode true', () => {
let bsConfig = {

@@ -688,4 +688,2 @@ connection_settings: {

};
let searchForOptionStub = sinon.stub(utils,"searchForOption");
searchForOptionStub.returns(false);
utils.setLocal(bsConfig,args);

@@ -731,3 +729,3 @@ expect(bsConfig.connection_settings.local_inferred).to.be.eq(true);

it('should change local to true in bsConfig if process.env.BROWSERSTACK_LOCAL is set to true', () => {
it('should change local to true in bsConfig if args.local is set to true', () => {
let bsConfig = {

@@ -738,4 +736,3 @@ connection_settings: {

};
let args = {};
process.env.BROWSERSTACK_LOCAL = true;
let args = { local: true };
utils.setLocal(bsConfig,args);

@@ -755,2 +752,15 @@ expect(bsConfig.connection_settings.local).to.be.eq(true);

});
it('should set local to true in bsConfig if local is passed as string in bsConfig', () => {
let bsConfig = {
connection_settings: {
local: "true"
},
};
let args = {
};
utils.setLocal(bsConfig, args);
expect(bsConfig.connection_settings.local).to.be.eq(true);
});
});

@@ -1436,2 +1446,19 @@

});
it ('should set connection_settings if bsConfig.connection_settings is undefined' , () => {
let bsConfig = { run_settings: {} };
utils.setDefaults(bsConfig, {});
expect(utils.isUndefined(bsConfig.connection_settings)).to.be.false;
});
it('should not set connection_settings if bsConfig.connection_settings is defined ', () => {
let bsConfig = {
run_settings: {},
connection_settings: {
local: "false"
}
};
utils.setDefaults(bsConfig, {});
expect(bsConfig.connection_settings).to.deep.equal({local: "false"});
});
});

@@ -1438,0 +1465,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc