packages/miew/src/chem/selectors/selectArgs.test.js

Summary

Maintainability
F
1 wk
Test Coverage

File selectArgs.test.js has 289 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import chai, { expect } from 'chai'
import dirtyChai from 'dirty-chai'
import { Range, RangeList, ValueList } from './selectArgs'

chai.use(dirtyChai)
Severity: Minor
Found in packages/miew/src/chem/selectors/selectArgs.test.js - About 2 hrs to fix

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

        it('keeps containing one of two equal values after deleting another (case sensitive list)', () => {
          expect(valueList.includes(45)).to.equal(true)
          valueList.remove(45)
          expect(valueList.includes(45)).to.equal(true)
          valueList.remove(45)
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 4 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 285..291

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

    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('keeps containing one of two equal values after deleting another (only upper case list)', () => {
          expect(valueListOnlyUpper.includes(45)).to.equal(true)
          valueListOnlyUpper.remove(45)
          expect(valueListOnlyUpper.includes(45)).to.equal(true)
          valueListOnlyUpper.remove(45)
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 4 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 248..254

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

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

        it('begins containing upper case version of appending value (only upper case list)', () => {
          expect(valueListOnlyUpper.includes(VaLuE.toUpperCase())).to.equal(false)
          valueListOnlyUpper.append(VaLuE)
          expect(valueListOnlyUpper.includes(VaLuE.toUpperCase())).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 2 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 275..279
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 292..296

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

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

        it('stops containing removing value even if it was sent not in upper case (only upper case list)', () => {
          expect(valueListOnlyUpper.includes(VaLuE.toUpperCase())).to.equal(true)
          valueListOnlyUpper.remove(vALue)
          expect(valueListOnlyUpper.includes(VaLuE.toUpperCase())).to.equal(false)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 2 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 209..213
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 292..296

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

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

        it('keeps containing all values when removed value was not existing in it (only upper case list)', () => {
          expect(valueListOnlyUpper.includes(VaLuE.toUpperCase())).to.equal(true)
          valueListOnlyUpper.remove(anotherValue)
          expect(valueListOnlyUpper.includes(VaLuE.toUpperCase())).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 2 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 209..213
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 275..279

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

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

      describe('#toString()', () => {
        it('constructs string for case sensitive list', () => {
          expect(vList.toString()).to.equal('45,"VaLu E"')
        })
        it('constructs string for only upper case list', () => {
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 3 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 26..33
    packages/miew/src/chem/selectors/selectorsBase.test.js on lines 41..48
    packages/miew/src/chem/selectors/selectorsBase.test.js on lines 85..92

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

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

      describe('#toString()', () => {
        it('constructs string for two arguments range', () => {
          expect(rFrom2To8.toString()).to.equal('2:8')
        })
        it('constructs string for one argument range', () => {
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 3 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 150..157
    packages/miew/src/chem/selectors/selectorsBase.test.js on lines 41..48
    packages/miew/src/chem/selectors/selectorsBase.test.js on lines 85..92

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

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

        it('does not begin containing appending value in different case (case sensitive list)', () => {
          expect(valueList.includes(vALue)).to.equal(false)
          valueList.append(VaLuE)
          expect(valueList.includes(vALue)).to.equal(false)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

        it('does not begin containing values outside of appending range', () => {
          expect(rangeList.includes(1)).to.equal(false)
          rangeList.append(rFrom18To20)
          expect(rangeList.includes(1)).to.equal(false)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

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

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

        it('keeps containing values from all ranges when removed range was not existing in list', () => {
          expect(rangeList.includes(2)).to.equal(true)
          rangeList.remove(rEqual2)
          expect(rangeList.includes(2)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

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

    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('begins containing appending value even if it is not string (only upper case list)', () => {
          expect(valueListOnlyUpper.includes(45)).to.equal(false)
          valueListOnlyUpper.append(45)
          expect(valueListOnlyUpper.includes(45)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 270..274

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

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

        it('keeps containing remaining values', () => {
          expect(valueListOnlyUpper.includes(45)).to.equal(true)
          valueListOnlyUpper.remove(VaLuE)
          expect(valueListOnlyUpper.includes(45)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247

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

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

        it('keeps containing all values when removed value was not existing in list in such case (case sensitive list)', () => {
          expect(valueList.includes(VaLuE)).to.equal(true)
          valueList.remove(vALue)
          expect(valueList.includes(VaLuE)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259

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

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

        it('begins containing appending value (case sensitive list)', () => {
          expect(valueList.includes(VaLuE)).to.equal(false)
          valueList.append(VaLuE)
          expect(valueList.includes(VaLuE)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

        it('keeps containing all values when removed value was not existing in it (case sensitive list)', () => {
          expect(valueList.includes(VaLuE)).to.equal(true)
          valueList.remove(anotherValue)
          expect(valueList.includes(VaLuE)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

        it('stops containing removing value (case sensitive list)', () => {
          expect(valueList.includes(VaLuE)).to.equal(true)
          valueList.remove(VaLuE)
          expect(valueList.includes(VaLuE)).to.equal(false)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

    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('stops containing removing value even if it is not string (only upper case list)', () => {
          expect(valueListOnlyUpper.includes(78)).to.equal(true)
          valueListOnlyUpper.remove(78)
          expect(valueListOnlyUpper.includes(78)).to.equal(false)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 214..218

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

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

        it('does not begin containing not upper case version of appending value (only upper case list)', () => {
          expect(valueListOnlyUpper.includes(VaLuE)).to.equal(false)
          valueListOnlyUpper.append(VaLuE)
          expect(valueListOnlyUpper.includes(VaLuE)).to.equal(false)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

        it('keeps containing remaining values (case sensitive list)', () => {
          expect(valueList.includes(45)).to.equal(true)
          valueList.remove(VaLuE)
          expect(valueList.includes(45)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

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

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

        it('begins containing values from appending range', () => {
          expect(rangeList.includes(19)).to.equal(false)
          rangeList.append(rFrom18To20)
          expect(rangeList.includes(19)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

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

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

        it('stops containing values from removing range', () => {
          expect(rangeList.includes(19)).to.equal(true)
          rangeList.remove(rFrom18To20)
          expect(rangeList.includes(19)).to.equal(false)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

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

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

        it('keeps containing values from remaining ranges', () => {
          expect(rangeList.includes(13)).to.equal(true)
          rangeList.remove(rFrom18To20)
          expect(rangeList.includes(13)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

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

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

        it('keeps containing values from remaining ranges even if they also exists in removing range', () => {
          expect(rangeList.includes(5)).to.equal(true)
          rangeList.remove(rFrom1To14)
          expect(rangeList.includes(5)).to.equal(true)
        })
    Severity: Major
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

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

    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('constructs JSON for two arguments range', () => {
          expect(rFrom2To8.toJSON()).to.deep.equal([2, 8])
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 35 mins to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 38..40

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

    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('constructs JSON for one argument range', () => {
          expect(rEqual2.toJSON()).to.deep.equal([2, 2])
        })
    Severity: Minor
    Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 35 mins to fix
    packages/miew/src/chem/selectors/selectArgs.test.js on lines 35..37

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

    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