gmmorris/simmerjs

View on GitHub

Showing 62 of 62 total issues

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

test(`can analyze an element based only on child elements when specific enough at level 2`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    '.secondLevelUniqueClassName div'
Severity: Major
Found in __tests__/integration/index.test.js and 1 other location - About 6 hrs to fix
__tests__/integration/index.test.js on lines 223..232

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

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

test(`can analyze an element based only on child elements when specific enough at level 1`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '.uniqueClassName')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 1 other location - About 6 hrs to fix
__tests__/integration/index.test.js on lines 234..246

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

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

test(`can analyze an element with a valid ID that has numbers in the middle of it's ID`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '#a111a')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 1 other location - About 6 hrs to fix
__tests__/integration/index.test.js on lines 248..257

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

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

test(`can analyze an element with a valid ID that ends with numbers in it's ID`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '#a111')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 1 other location - About 6 hrs to fix
__tests__/integration/index.test.js on lines 259..268

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

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

test(`can analyze a link with a non unique href attribute and a heirarchy which has no unique IDs`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    'table tr th:nth-child(3) a'
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element with identical siblings (neither unique ID nor class)`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '.Edge:nth-child(5)')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element which is a child of an element with an ID`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '#NavBar ul')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element with identical siblings, no ID and different classes completely`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, 'td span:nth-child(2)')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze anelement which has a class only (no IDs on it or its direct parent)`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '.Active')
  expect(elements).not.toBe(undefined)
  expect(elements.el).toBe(elements.SimmerEl)
Severity: Major
Found in __tests__/integration/index.test.js and 1 other location - About 4 hrs to fix
__tests__/integration/index.test.js on lines 73..83

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

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

test(`can analyze an element with a parent which has an invalid Tag name`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    '.invalid_child_tag span'
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200

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

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

test(`can analyze a child of a hierarchy with identical siblings and no unique IDs`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    'tr:nth-child(2) td:nth-child(3)'
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element with an invalid ID (isn't unique) at same level as other element with the same ID`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    '#BodyDiv div:nth-child(1)'
Severity: Major
Found in __tests__/integration/index.test.js and 1 other location - About 4 hrs to fix
__tests__/integration/index.test.js on lines 52..59

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

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

test(`can analyze an anchor (link) with a unique href attribute`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    'table tr th:nth-child(2) a'
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element with identical siblings, no IDs and sibling with the same class`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, 'td span:nth-child(3)')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an image with a non unique src attribute`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    '#BodyDiv div:nth-child(2) img'
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an image who'se paren't has an invalid ID`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    '#BodyDiv div:nth-child(1) img'
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an image with a unique src attribute`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(
    windowScope,
    'img[src="./image/Pixel.png"]'
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element with classes only (No ID)`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '.header')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element with identical siblings, no ID and same class as sibling but different class order`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, 'td span:nth-child(4)')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 25..32
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

test(`can analyze an element with an ID`, function () {
  const windowScope = createWindow(fixture)
  var elements = compareElementsAndSimmer(windowScope, '#BodyDiv')
  expect(elements).not.toBe(undefined)
  expect(elements.SimmerEl).not.toBe(undefined)
Severity: Major
Found in __tests__/integration/index.test.js and 13 other locations - About 4 hrs to fix
__tests__/integration/index.test.js on lines 34..41
__tests__/integration/index.test.js on lines 43..50
__tests__/integration/index.test.js on lines 85..92
__tests__/integration/index.test.js on lines 103..113
__tests__/integration/index.test.js on lines 115..125
__tests__/integration/index.test.js on lines 127..137
__tests__/integration/index.test.js on lines 139..149
__tests__/integration/index.test.js on lines 151..161
__tests__/integration/index.test.js on lines 163..173
__tests__/integration/index.test.js on lines 175..182
__tests__/integration/index.test.js on lines 184..191
__tests__/integration/index.test.js on lines 193..200
__tests__/integration/index.test.js on lines 211..221

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

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

Severity
Category
Status
Source
Language