Showing 52 of 131 total issues
Function killSession
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var killSession = function (job) {
// This will stop the session, causing a 'User terminated' error.
// If we don't manually stop the session, we get a timed-out error.
var options = {
url: this.options.sauceLabsUrl + '/jobs/' + job.id + '/stop',
Function setupGlobals
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
setupGlobals: function () {
global.wrapAsync = wrapAsync;
global.wrapAsyncObject = wrapAsyncObject;
// give users access the request module
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function runJasmineInFiber
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
new Fiber(function runJasmineInFiber() {
const projectDir = process.env.PWD;
const testsDir = process.env['chimp.path'];
process.chdir(testsDir);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function kill
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
kill: function (options, callback) {
log.debug('[chimp][' + options.prefix + ']', 'kill called on ' + options.prefix + ' process with pid', options.child.pid);
options.signal = options.signal || 'SIGTERM';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function interrupt
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Chimp.prototype.interrupt = function (callback) {
log.debug('[chimp] interrupting');
const self = this;
Function addServerExecute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var addServerExecute = function (ddpInstance) {
ddpInstance.execute = function (func) {
var args = Array.prototype.slice.call(arguments, 1);
var result;
var timeout = parseInt(process.env['chimp.serverExecuteTimeout']) || 10000;
Function Chimp
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function Chimp(options) {
this.chokidar = chokidar;
this.options = options || {};
this.processes = [];
this.isInterrupting = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function killCurrentSession
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
BrowserStackSessionManager.prototype.killCurrentSession = function (callback) {
var self = this;
var wdOptions = this.options;
const wdHubSession = 'http://' + wdOptions.host + ':' + wdOptions.port + '/wd/hub/session';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _configureRemote
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
SessionManager.prototype._configureRemote = function (webdriverOptions, remote, callback) {
var self = this;
log.debug('[chimp][session-manager] creating webdriver remote ');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Chimp.prototype.init = function (callback) {
const self = this;
this.informUser();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getJasmineConfig
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getJasmineConfig() {
const jasmineConfig = JSON.parse(process.env['chimp.jasmineConfig']);
if (jasmineConfig.specDir) {
if (!jasmineConfig.spec_dir) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getOptions() {
let userOptionsFile;
const processArgv = this._getProcessArgv();
if (processArgv[2] && processArgv[2].match(/.*chimp.*\.js$/)) {
userOptionsFile = path.resolve(process.cwd(), processArgv[2]);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"