RHeactorJS/bdd-contexts

View on GitHub

Showing 5 of 5 total issues

File rest-client.js has 438 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import _forIn from 'lodash/forIn'
import _filter from 'lodash/filter'
import _merge from 'lodash/merge'
import _property from 'lodash/property'
import {expect} from 'chai'
Severity: Minor
Found in src/rest-client.js - About 6 hrs to fix

    RestClientContext has 47 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export const RestClientContext = {
      beforeScenario: (context) => {
        context.body = undefined
        context.header = {}
      },
    Severity: Minor
    Found in src/rest-client.js - About 6 hrs to fix

      Function doRequest has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function doRequest (context, method, endpoint, next) {
        let agent = client(context)
        let url = utils.template(endpoint, utils.data(context))
        let localUrl = url.replace(testHost, '')
        if (process.env.DEBUG_REST) {
      Severity: Minor
      Found in src/rest-client.js - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                    if (response.headers['www-authenticate']) console.log('<', 'www-authenticate:', response.headers['www-authenticate'])
        Severity: Major
        Found in src/rest-client.js - About 45 mins to fix

          Function storage has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function storage (store, defaults, context, name, value) {
          Severity: Minor
          Found in src/util/storage.js - About 35 mins to fix
            Severity
            Category
            Status
            Source
            Language