karma-runner/karma

View on GitHub
static/karma.js

Summary

Maintainability
F
4 mos
Test Coverage

Function 10 has 1315 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./reversed.json":10,"punycode":12}],10:[function(require,module,exports){
module.exports={
    "9": "Tab;",
    "10": "NewLine;",
    "33": "excl;",
Severity: Major
Found in static/karma.js - About 6 days to fix

    File karma.js has 2357 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
    module.exports = {
      VERSION: '%KARMA_VERSION%',
      KARMA_URL_ROOT: '%KARMA_URL_ROOT%',
      KARMA_PROXY_PATH: '%KARMA_PROXY_PATH%',
    Severity: Major
    Found in static/karma.js - About 6 days to fix

      Function 12 has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
      Open

      },{}],12:[function(require,module,exports){
      (function (global){
      /*! https://mths.be/punycode v1.4.1 by @mathias */
      ;(function(root) {
      
      
      Severity: Minor
      Found in static/karma.js - About 4 days to fix

      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 2 has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring.
      Open

      },{}],2:[function(require,module,exports){
      var stringify = require('../common/stringify')
      var constant = require('./constants')
      var util = require('../common/util')
      
      
      Severity: Minor
      Found in static/karma.js - About 2 days to fix

      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 11 has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
      Open

      },{}],11:[function(require,module,exports){
      'use strict';
      
      var hasOwn = Object.prototype.hasOwnProperty;
      var toStr = Object.prototype.toString;
      Severity: Minor
      Found in static/karma.js - About 1 day to fix

      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 12 has 290 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],12:[function(require,module,exports){
      (function (global){
      /*! https://mths.be/punycode v1.4.1 by @mathias */
      ;(function(root) {
      
      
      Severity: Major
      Found in static/karma.js - About 1 day to fix

        Function 5 has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
        Open

        },{"./constants":1}],5:[function(require,module,exports){
        var serialize = null
        try {
          serialize = require('dom-serialize')
        } catch (e) {
        Severity: Minor
        Found in static/karma.js - About 1 day to fix

        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 2 has 235 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],2:[function(require,module,exports){
        var stringify = require('../common/stringify')
        var constant = require('./constants')
        var util = require('../common/util')
        
        
        Severity: Major
        Found in static/karma.js - About 1 day to fix

          Function Karma has 229 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function Karma (updater, socket, iframe, opener, navigator, location, document) {
            this.updater = updater
            var startEmitted = false
            var self = this
            var queryParams = util.parseQueryParams(location.search)
          Severity: Major
          Found in static/karma.js - About 1 day to fix

            Function 8 has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
            Open

            },{}],8:[function(require,module,exports){
            
            /**
             * Module dependencies.
             */
            Severity: Minor
            Found in static/karma.js - About 6 hrs to fix

            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 8 has 127 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{}],8:[function(require,module,exports){
            
            /**
             * Module dependencies.
             */
            Severity: Major
            Found in static/karma.js - About 5 hrs to fix

              Function 7 has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
              Open

              },{}],7:[function(require,module,exports){
              (function (global){
              
              var NativeCustomEvent = global.CustomEvent;
              
              
              Severity: Minor
              Found in static/karma.js - About 3 hrs to fix

              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 5 has 88 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"./constants":1}],5:[function(require,module,exports){
              var serialize = null
              try {
                serialize = require('dom-serialize')
              } catch (e) {
              Severity: Major
              Found in static/karma.js - About 3 hrs to fix

                Function 11 has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{}],11:[function(require,module,exports){
                'use strict';
                
                var hasOwn = Object.prototype.hasOwnProperty;
                var toStr = Object.prototype.toString;
                Severity: Major
                Found in static/karma.js - About 3 hrs to fix

                  Function 9 has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"custom-event":7,"ent/encode":9,"extend":11,"void-elements":13}],9:[function(require,module,exports){
                  var punycode = require('punycode');
                  var revEntities = require('./reversed.json');
                  
                  module.exports = encode;
                  Severity: Minor
                  Found in static/karma.js - About 3 hrs to fix

                  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 stringify has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function stringify (obj, depth) {
                    if (depth === 0) {
                      return '...'
                    }
                  
                  
                  Severity: Major
                  Found in static/karma.js - About 3 hrs to fix

                    Function encode has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function encode(input) {
                            var n,
                                delta,
                                handledCPCount,
                                basicLength,
                    Severity: Major
                    Found in static/karma.js - About 2 hrs to fix

                      Function 4 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                      Open

                      },{"../common/util":6,"./constants":1,"./karma":2,"./updater":4}],4:[function(require,module,exports){
                      var VERSION = require('./constants').VERSION
                      
                      function StatusUpdater (socket, titleElement, bannerElement, browsersElement) {
                        function updateBrowsersInfo (browsers) {
                      Severity: Minor
                      Found in static/karma.js - About 2 hrs to fix

                      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 4 has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{"../common/util":6,"./constants":1,"./karma":2,"./updater":4}],4:[function(require,module,exports){
                      var VERSION = require('./constants').VERSION
                      
                      function StatusUpdater (socket, titleElement, bannerElement, browsersElement) {
                        function updateBrowsersInfo (browsers) {
                      Severity: Major
                      Found in static/karma.js - About 2 hrs to fix

                        Function StatusUpdater has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function StatusUpdater (socket, titleElement, bannerElement, browsersElement) {
                          function updateBrowsersInfo (browsers) {
                            if (!browsersElement) {
                              return
                            }
                        Severity: Major
                        Found in static/karma.js - About 2 hrs to fix

                          Function serialize has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function serialize (node, context, fn, eventTarget) {
                            if (!node) return '';
                            if ('function' === typeof context) {
                              fn = context;
                              context = null;
                          Severity: Major
                          Found in static/karma.js - About 2 hrs to fix

                            Function decode has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function decode(input) {
                                    // Don't use UCS-2
                                    var output = [],
                                        inputLength = input.length,
                                        out,
                            Severity: Major
                            Found in static/karma.js - About 2 hrs to fix

                              Function navigateContextTo has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function navigateContextTo (url) {
                                  if (self.config.useIframe === false) {
                                    // run in new window
                                    if (self.config.runInParent === false) {
                                      // If there is a window already open, then close it
                              Severity: Minor
                              Found in static/karma.js - About 1 hr to fix

                                Function extend has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                module.exports = function extend() {
                                    var options, name, src, copy, copyIsArray, clone;
                                    var target = arguments[0];
                                    var i = 1;
                                    var length = arguments.length;
                                Severity: Minor
                                Found in static/karma.js - About 1 hr to fix

                                  Function 7 has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  },{}],7:[function(require,module,exports){
                                  (function (global){
                                  
                                  var NativeCustomEvent = global.CustomEvent;
                                  
                                  
                                  Severity: Minor
                                  Found in static/karma.js - About 1 hr to fix

                                    Function 9 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{"custom-event":7,"ent/encode":9,"extend":11,"void-elements":13}],9:[function(require,module,exports){
                                    var punycode = require('punycode');
                                    var revEntities = require('./reversed.json');
                                    
                                    module.exports = encode;
                                    Severity: Minor
                                    Found in static/karma.js - About 1 hr to fix

                                      Function encode has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function encode (str, opts) {
                                          if (typeof str !== 'string') {
                                              throw new TypeError('Expected a String');
                                          }
                                          if (!opts) opts = {};
                                      Severity: Minor
                                      Found in static/karma.js - About 1 hr to fix

                                        Function complete has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          this.complete = function (result) {
                                            if (resultsBuffer.length) {
                                              socket.emit('result', resultsBuffer)
                                              resultsBuffer = []
                                            }
                                        Severity: Minor
                                        Found in static/karma.js - About 1 hr to fix

                                          Function result has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                            this.result = function (originalResult) {
                                              var convertedResult = {}
                                          
                                              // Convert all array-like objects to real arrays.
                                              for (var propertyName in originalResult) {
                                          Severity: Minor
                                          Found in static/karma.js - About 1 hr to fix

                                            Function Karma has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                            function Karma (updater, socket, iframe, opener, navigator, location, document) {
                                            Severity: Major
                                            Found in static/karma.js - About 50 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                  if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
                                                                      if (copyIsArray) {
                                                                          copyIsArray = false;
                                                                          clone = src && isArray(src) ? src : [];
                                                                      } else {
                                              Severity: Major
                                              Found in static/karma.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                            if (ele.tagName && ele.tagName.toLowerCase() === 'script') {
                                                              var tmp = ele
                                                              ele = document.createElement('script')
                                                              ele.src = policy.createScriptURL(tmp.src)
                                                              ele.crossOrigin = tmp.crossOrigin
                                                Severity: Major
                                                Found in static/karma.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                          if (obj.constructor && typeof obj.constructor === 'function') {
                                                            constructor = obj.constructor.name
                                                          }
                                                  Severity: Major
                                                  Found in static/karma.js - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                            for (var key in obj) {
                                                              if (Object.prototype.hasOwnProperty.call(obj, key)) {
                                                                if (first) {
                                                                  first = false
                                                                } else {
                                                    Severity: Major
                                                    Found in static/karma.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                              if (q < t) {
                                                                                  break;
                                                                              }
                                                      Severity: Major
                                                      Found in static/karma.js - About 45 mins to fix

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

                                                          this.error = function (messageOrEvent, source, lineno, colno, error) {
                                                        Severity: Minor
                                                        Found in static/karma.js - About 35 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  return obj.toString()
                                                          Severity: Major
                                                          Found in static/karma.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                      return 'Skipping stringify, no support for dom-serialize'
                                                            Severity: Major
                                                            Found in static/karma.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                      return obj.toString() + '\n' + obj.stack
                                                              Severity: Major
                                                              Found in static/karma.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                          return serialize(obj)
                                                                Severity: Major
                                                                Found in static/karma.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                          return obj.nodeValue
                                                                  Severity: Major
                                                                  Found in static/karma.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                          return strs.join('')
                                                                    Severity: Major
                                                                    Found in static/karma.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                              return '<!--' + obj.nodeValue + '-->'
                                                                      Severity: Major
                                                                      Found in static/karma.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                                return obj.outerHTML
                                                                        Severity: Major
                                                                        Found in static/karma.js - About 30 mins to fix

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{"./reversed.json":10,"punycode":12}],10:[function(require,module,exports){
                                                                          module.exports={
                                                                              "9": "Tab;",
                                                                              "10": "NewLine;",
                                                                              "33": "excl;",
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 1 mo to fix
                                                                          static/context.js on lines 648..1964

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 6594.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{}],12:[function(require,module,exports){
                                                                          (function (global){
                                                                          /*! https://mths.be/punycode v1.4.1 by @mathias */
                                                                          ;(function(root) {
                                                                          
                                                                          
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 2 wks to fix
                                                                          static/context.js on lines 2083..2620

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 2723.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Identical blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          function Karma (updater, socket, iframe, opener, navigator, location, document) {
                                                                            this.updater = updater
                                                                            var startEmitted = false
                                                                            var self = this
                                                                            var queryParams = util.parseQueryParams(location.search)
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 2 wks to fix
                                                                          client/karma.js on lines 5..322

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 2354.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{}],8:[function(require,module,exports){
                                                                          
                                                                          /**
                                                                           * Module dependencies.
                                                                           */
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 1 wk to fix
                                                                          static/context.js on lines 375..607

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 1323.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{}],11:[function(require,module,exports){
                                                                          'use strict';
                                                                          
                                                                          var hasOwn = Object.prototype.hasOwnProperty;
                                                                          var toStr = Object.prototype.toString;
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 5 days to fix
                                                                          static/context.js on lines 1964..2083

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 908.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{"./constants":1}],5:[function(require,module,exports){
                                                                          var serialize = null
                                                                          try {
                                                                            serialize = require('dom-serialize')
                                                                          } catch (e) {
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 4 days to fix
                                                                          static/context.js on lines 1..103

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 774.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Identical blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          function StatusUpdater (socket, titleElement, bannerElement, browsersElement) {
                                                                            function updateBrowsersInfo (browsers) {
                                                                              if (!browsersElement) {
                                                                                return
                                                                              }
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 3 days to fix
                                                                          client/updater.js on lines 3..78

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 594.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{}],7:[function(require,module,exports){
                                                                          (function (global){
                                                                          
                                                                          var NativeCustomEvent = global.CustomEvent;
                                                                          
                                                                          
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 2 days to fix
                                                                          static/context.js on lines 323..375

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 429.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{"custom-event":7,"ent/encode":9,"extend":11,"void-elements":13}],9:[function(require,module,exports){
                                                                          var punycode = require('punycode');
                                                                          var revEntities = require('./reversed.json');
                                                                          
                                                                          module.exports = encode;
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 2 days to fix
                                                                          static/context.js on lines 607..648

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 404.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{"./util":6,"dom-serialize":8}],6:[function(require,module,exports){
                                                                          exports.instanceOf = function (value, constructorName) {
                                                                            return Object.prototype.toString.apply(value) === '[object ' + constructorName + ']'
                                                                          }
                                                                          
                                                                          
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 1 day to fix
                                                                          static/context.js on lines 103..137

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 322.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Identical blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
                                                                          module.exports = {
                                                                            VERSION: '%KARMA_VERSION%',
                                                                            KARMA_URL_ROOT: '%KARMA_URL_ROOT%',
                                                                            KARMA_PROXY_PATH: '%KARMA_PROXY_PATH%',
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 1 day to fix
                                                                          static/context.js on lines 1..2645

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 300.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          },{}],13:[function(require,module,exports){
                                                                          /**
                                                                           * This file automatically generated from `pre-publish.js`.
                                                                           * Do not manually edit.
                                                                           */
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 3 hrs to fix
                                                                          static/context.js on lines 2620..2645

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 111.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Identical blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          var socket = io(location.host, {
                                                                            reconnectionDelay: 500,
                                                                            reconnectionDelayMax: Infinity,
                                                                            timeout: BROWSER_SOCKET_TIMEOUT,
                                                                            path: KARMA_PROXY_PATH + KARMA_URL_ROOT.slice(1) + 'socket.io',
                                                                          Severity: Major
                                                                          Found in static/karma.js and 1 other location - About 1 hr to fix
                                                                          client/main.js on lines 14..21

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 67.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          Identical blocks of code found in 2 locations. Consider refactoring.
                                                                          Open

                                                                          window.karma = new Karma(updater, socket, util.elm('context'), window.open,
                                                                            window.navigator, window.location, window.document)
                                                                          Severity: Minor
                                                                          Found in static/karma.js and 1 other location - About 30 mins to fix
                                                                          client/main.js on lines 25..26

                                                                          Duplicated Code

                                                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                          Tuning

                                                                          This issue has a mass of 45.

                                                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                          Refactorings

                                                                          Further Reading

                                                                          There are no issues that match your filters.

                                                                          Category
                                                                          Status