Showing 53 of 286 total issues
File chain.js
has 720 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var logMethods = require('./log');
var type = require('./type');
var when = require('./when');
- Create a ticketCreate a ticket
File screenshot.js
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var logMethods = require('../log');
var type = require('../type');
var when = require('../when');
- Create a ticketCreate a ticket
Function load
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: function () {
function versionInfo () {
return {
major: 1,
- Create a ticketCreate a ticket
Function load
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
load: function () {
function versionInfo () {
return {
major: 1,
- Read upRead up
- Create a ticketCreate a ticket
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 _parseResponse
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Connection.prototype._parseResponse = function (res, requestData, options) {
var body,
data,
filePath,
- Read upRead up
- Create a ticketCreate a ticket
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
File driver.js
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var url = require('url');
- Create a ticketCreate a ticket
File nightwatch.js
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var logMethods = require('../log');
var type = require('../type');
var when = require('../when');
- Create a ticketCreate a ticket
Function compare
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
BlinkDiffComparison.prototype.compare = function (title, imageBlob, options) {
var instance,
diffPath, buildPath, approvedPath,
result, passed, localOptions;
- Read upRead up
- Create a ticketCreate a ticket
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 _gatherSections
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Screenshot.prototype._gatherSections = function (area, padding, initData, maxImageResolution, needsStitching) {
var sections = [], section,
sectionCount, sectionHeight,
i, index = 0,
- Create a ticketCreate a ticket
Function _parseResponse
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Connection.prototype._parseResponse = function (res, requestData, options) {
var body,
data,
filePath,
- Create a ticketCreate a ticket
Function domInfo
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function domInfo () {
var capturedTags = ["A", "SPAN", "OL", "UL", "LI", "HEADER", "FOOTER", "NAV", "ARTICLE", "SECTION", "ASIDE", "DIV", "APPLET", "CANVAS", "VIDEO", "TABLE", "DETAILS", "SUMMARY", "IFRAME", "MENU", "MAIN", "FIGURE", "FIELDSET"];
function loadDOMNode (inputNode, parentNode) {
- Create a ticketCreate a ticket
Function _takeScreenshot
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Screenshot.prototype._takeScreenshot = function (fn, options) {
var DevicePixelRatio = require('./devicePixelRatio'),
devicePixelRatio = new DevicePixelRatio(this.getDriver()),
- Create a ticketCreate a ticket
Function _determineBlockOuts
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Screenshot.prototype._determineBlockOuts = function (area, context, blockOuts, blockOutColor) {
var defaultColor = blockOutColor || { red: 0, green: 0, blue: 0 };
return when(this.getDriver().utils().map(blockOuts, function (blockOutEl) {
- Create a ticketCreate a ticket
Function init
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function (needsStitching) {
var initData = {
viewPort: {},
document: {},
- Create a ticketCreate a ticket
Function compare
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
BlinkDiffComparison.prototype.compare = function (title, imageBlob, options) {
var instance,
diffPath, buildPath, approvedPath,
result, passed, localOptions;
- Create a ticketCreate a ticket
Function setupDebug
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setupDebug (driver, options) {
var indentation = 0;
function stringFill (filler, length) {
var buffer = new Buffer(length);
- Create a ticketCreate a ticket
Function _browserPadding
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Screenshot.prototype._browserPadding = function (padding) {
var paddingViewPortTop = 0, paddingViewPortBottom = 0,
paddingViewPortLeft = 0, paddingViewPortRight = 0,
paddingScreenshotTop = 0, paddingScreenshotBottom = 0,
- Create a ticketCreate a ticket
Function init
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function (horizontalPadding) {
var de = document.documentElement,
body = document.body,
el, initData;
- Create a ticketCreate a ticket
Function Driver
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Driver (remote, capabilities, options) {
EventEmitter.call(this);
type('remote', remote, 'String|Object');
type('capabilities', capabilities, 'Object');
- Create a ticketCreate a ticket
Function type
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function type (val) {
switch (Object.prototype.toString.call(val)) {
case '[object Date]':
return 'Date';
case '[object RegExp]':
- Read upRead up
- Create a ticketCreate a ticket
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"