Showing 123 of 181 total issues
Function runTokenSession
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
async runTokenSession() {
suitest.logger.intro(t.launcherGreeting, version);
validateInput(TOKEN.toUpperCase(), this.ownArgv);
const appConfigIdAndDeviceIdPresented = this.ownArgv.appConfigId && this.ownArgv.deviceId;
const presetArrayDefined = this.ownArgv.preset && this.ownArgv.preset.length > 0;
Function javascriptExpressionFactory
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
const javascriptExpressionFactory = (classInstance) => {
const toJSON = data => {
const type = getRequestType(data);
const socketMessage = {type};
Function makeThenComposer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const makeThenComposer = (getSocketMessage, callback, beforeSend) => makeMethodComposer(
composers.THEN,
['then'],
({webSockets, authContext, logger, config, appContext}, data, onResolve, onReject) => {
const chainedPromise = chainPromise(async() => {
- 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 makeArgumentsProcessor
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
const makeArgumentsProcessor = (
fromArguments,
fromObject = identity,
fromObjectArgsValidator = () => true,
fromKeyValue = identity,
- 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 playstationVideoFactory
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
const playstationVideoFactory = (classInstance) => {
const toJSON = data => {
const type = getRequestType(data);
const socketMessage = {type};
const subject = {
- 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
Consider simplifying this complex logical expression. Open
if (
!data.timeout
&& !data.isClick
&& !data.isSwipe
&& !data.isScroll
Consider simplifying this complex logical expression. Open
if (
!data.comparator
&& !data.isClick
&& !data.isMoveTo
&& !data.tap
Consider simplifying this complex logical expression. Open
if (
hasQuery &&
!data.comparator &&
!data.isClick &&
!data.tap &&
Function testPosition
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function testPosition() {
const {position} = suitest;
const samplePos = position(100, 100);
Function openAppChainFactory
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
const openAppChainFactory = (classInstance) => {
const toJSON = data => {
const socketMessage = {
type: getRequestType(data, false),
request: {
Function saveScreenshotFactory
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
const saveScreenshotFactory = (classInstance) => {
function getPlaceholdersValues(date = new Date()) {
const userStackItem = getFirstNotSuitestStackItem();
return {
Function pressButtonFactory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const pressButtonFactory = (classInstance) => {
const toJSON = (data) => {
const base = {
type: 'button',
ids: data.ids,
- 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 javascriptExpressionFactory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const javascriptExpressionFactory = (classInstance) => {
const toJSON = data => {
const type = getRequestType(data);
const socketMessage = {type};
- 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 brightScriptExpressionFactory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const brightScriptExpressionFactory = (classInstance) => {
const {logger} = classInstance;
const toJSON = data => {
const type = getRequestType(data);
- 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 ocrFactory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ocrFactory = (classInstance) => {
const toJSON = (data) => {
const subject = {type: 'ocr'};
const socketMessage = {type: getRequestType(data)};
- 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 locationFactory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const locationFactory = (classInstance) => {
const toJSON = data => {
const type = getRequestType(data);
const subject = {type: 'location'};
const socketMessage = {type};
- 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 locationFactory
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const locationFactory = (classInstance) => {
const toJSON = data => {
const type = getRequestType(data);
const subject = {type: 'location'};
const socketMessage = {type};
Function args
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
const args = data.map(d => {
// If not an array, display as it is.
if (!Array.isArray(d)) {
return d;
}
Function makeUrlFromArray
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function makeUrlFromArray(url) {
let key, reg;
let firstLoop = true;
if (Array.isArray(url)) {
- 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 openDeepLinkFactory
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const openDeepLinkFactory = (classInstance) => {
const toJSON = (data) => ({
type: getRequestType(data, false),
request: {
type: 'openDeepLink',