stikjs/stik-dom

View on GitHub
specs/node_spec.js

Summary

Maintainability
F
3 wks
Test Coverage

File node_spec.js has 723 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require("./spec_helper")

describe("$dom", function(){
  describe("hasClass", function(){
    it("whithout the class", function(){
Severity: Major
Found in specs/node_spec.js - About 1 day to fix

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

      describe("append", function(){
        it("with a non empty parent", function(){
          var template = document.createElement("div");
          template.innerHTML = "<span></span>";
          var newNode = document.createElement("div");
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 3 days to fix
    specs/node_spec.js on lines 401..460

    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 582.

    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

      describe("prepend", function(){
        it("with a non empty parent", function(){
          var template = document.createElement("div");
          template.innerHTML = "<span></span>";
          var newNode = document.createElement("div");
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 3 days to fix
    specs/node_spec.js on lines 340..399

    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 582.

    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 19 locations. Consider refactoring.
    Open

      describe("submit", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var submit = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("unload", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var unload = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("resize", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var resize = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("reset", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var reset = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("mouseDown", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var mouseDown = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("scroll", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var scroll = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("select", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var select = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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

        it("forcing removal", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          removeClassMock = jasmine.createSpy("removeClassMock");
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 4 hrs to fix
    specs/node_spec.js on lines 235..250

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("change", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var change = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("focus", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var focus = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("mouseMove", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var mouseMove = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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

        it("forcing addition", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          addClassMock = jasmine.createSpy("addClassMock");
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 4 hrs to fix
    specs/node_spec.js on lines 252..267

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("mouseOver", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var mouseOver = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("mouseUp", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var mouseUp = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("mouseOut", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var mouseOut = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("doubleClick", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var doubleClick = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("error", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var error = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("load", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var load = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("blur", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var blur = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("abort", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var abort = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 643..657
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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 19 locations. Consider refactoring.
    Open

      describe("click", function(){
        it("should create a listener", function(){
          var template = jasmine.createSpyObj("template", ["addEventListener"]);
    
          var click = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
    specs/node_spec.js on lines 659..673
    specs/node_spec.js on lines 675..689
    specs/node_spec.js on lines 691..705
    specs/node_spec.js on lines 707..721
    specs/node_spec.js on lines 723..737
    specs/node_spec.js on lines 739..753
    specs/node_spec.js on lines 755..769
    specs/node_spec.js on lines 771..785
    specs/node_spec.js on lines 787..801
    specs/node_spec.js on lines 803..817
    specs/node_spec.js on lines 819..833
    specs/node_spec.js on lines 835..849
    specs/node_spec.js on lines 851..865
    specs/node_spec.js on lines 867..881
    specs/node_spec.js on lines 883..897
    specs/node_spec.js on lines 899..913
    specs/node_spec.js on lines 915..929
    specs/node_spec.js on lines 931..945

    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 118.

    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

        it("with an array of classes", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          var addClass = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 3 hrs to fix
    specs/node_spec.js on lines 169..180

    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 101.

    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

        it("with an array of classes", function(){
          var elm = document.createElement("div");
          elm.className = "should-be-active and-functional active";
    
          var removeClass = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 3 hrs to fix
    specs/node_spec.js on lines 90..101

    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 101.

    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 10 locations. Consider refactoring.
    Open

        it("with a different class", function(){
          var elm = document.createElement("div");
          elm.className = "not-active";
    
          var toggleClass = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with multiple classes", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          var addClass = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with the class", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          var addClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with the class", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          var removeClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with the class", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          var toggleClass = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with a different class", function(){
          var elm = document.createElement("div");
          elm.className = "not-active";
    
          var removeClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with multiple classes", function(){
          var elm = document.createElement("div");
          elm.className = "should-be-active active and-functional";
    
          var removeClass = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with a different class", function(){
          var elm = document.createElement("div");
          elm.className = "not-active";
    
          var addClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("removing the middle class", function(){
          var elm = document.createElement("div");
          elm.className = "cc-number visa identified";
    
          var removeClass = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 143..154
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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 10 locations. Consider refactoring.
    Open

        it("with a close enough class", function(){
          var elm = document.createElement("div");
          elm.className = "active-by-click active";
    
          var removeClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
    specs/node_spec.js on lines 51..62
    specs/node_spec.js on lines 64..75
    specs/node_spec.js on lines 77..88
    specs/node_spec.js on lines 117..128
    specs/node_spec.js on lines 130..141
    specs/node_spec.js on lines 156..167
    specs/node_spec.js on lines 182..193
    specs/node_spec.js on lines 209..220
    specs/node_spec.js on lines 222..233

    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 98.

    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

        it("when visible", function(){
          var elm = document.createElement("div");
    
          var showHelper = stik.labs.dom({
            name: "show"
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 271..281

    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 90.

    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

        it("with the class", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          var hasClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 26..35

    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 90.

    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

        it("when visible", function(){
          var elm = document.createElement("div");
    
          var hideHelper = stik.labs.dom({
            name: "hide"
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 285..295

    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 90.

    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

        it("with a different class", function(){
          var elm = document.createElement("div");
          elm.className = "not-active";
    
          var hasClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 15..24

    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 90.

    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

        it("whithout the class", function(){
          var elm = document.createElement("div");
    
          var toggleClass = stik.labs.dom({
            name: "toggleClass"
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 39..49

    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 87.

    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

        it("whithout the class", function(){
          var elm = document.createElement("div");
    
          var addClassHelper = stik.labs.dom({
            name: "addClass"
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 197..207

    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 87.

    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