drdgvhbh/node-XMLHttpRequest

View on GitHub
__tests__/dom-exception.ts

Summary

Maintainability
D
1 day
Test Coverage

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

  test('url mismatch', () => {
    const e = new UrlMismatchDOMException();
    expect(e.code).toEqual(e.URL_MISMATCH_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('timeout', () => {
    const e = new TimeoutDOMException();
    expect(e.code).toEqual(e.TIMEOUT_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('domstring size', () => {
    const e = new StringSizeDOMException();
    expect(e.code).toEqual(e.DOMSTRING_SIZE_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('hierarchy request', () => {
    const e = new HierarchyRequestDOMException();
    expect(e.code).toEqual(e.HIERARCHY_REQUEST_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('not found', () => {
    const e = new NotFoundDOMException();
    expect(e.code).toEqual(e.NOT_FOUND_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('no data allowed', () => {
    const e = new NoDataAllowedDOMException();
    expect(e.code).toEqual(e.NO_DATA_ALLOWED_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('invalid state', () => {
    const e = new InvalidStateDOMException();
    expect(e.code).toEqual(e.INVALID_STATE_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('syntax', () => {
    const e = new SyntaxErrDOMException();
    expect(e.code).toEqual(e.SYNTAX_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('invalid node type', () => {
    const e = new InvalidNodeTypeDOMException();
    expect(e.code).toEqual(e.INVALID_NODE_TYPE_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 155..158

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

  test('namespace', () => {
    const e = new NamespaceErrDOMException();
    expect(e.code).toEqual(e.NAMESPACE_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('network', () => {
    const e = new NetworkErrDOMException();
    expect(e.code).toEqual(e.NETWORK_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('type mismatch', () => {
    const e = new TypeMismatchDOMException();
    expect(e.code).toEqual(e.TYPE_MISMATCH_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('security', () => {
    const e = new SecurityErrDOMException();
    expect(e.code).toEqual(e.SECURITY_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('wrong document', () => {
    const e = new WrongDocumentDOMException();
    expect(e.code).toEqual(e.WRONG_DOCUMENT_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('inuse attribute', () => {
    const e = new InUseAttributeDOMException();
    expect(e.code).toEqual(e.INUSE_ATTRIBUTE_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('invalid character', () => {
    const e = new InvalidCharacterDOMException();
    expect(e.code).toEqual(e.INVALID_CHARACTER_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('invalid access', () => {
    const e = new InvalidAccessDOMException();
    expect(e.code).toEqual(e.INVALID_ACCESS_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('validation', () => {
    const e = new ValidationErrDOMException();
    expect(e.code).toEqual(e.VALIDATION_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('no modification allowed', () => {
    const e = new NoDataModificationAllowedDOMException();
    expect(e.code).toEqual(e.NO_MODIFICATION_ALLOWED_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('abort', () => {
    const e = new AbortErrDOMException();
    expect(e.code).toEqual(e.ABORT_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('invalid modification', () => {
    const e = new InvalidModificationDOMException();
    expect(e.code).toEqual(e.INVALID_MODIFICATION_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('quota exceeded', () => {
    const e = new QuotaExceededDOMException();
    expect(e.code).toEqual(e.QUOTA_EXCEEDED_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('data clone', () => {
    const e = new DataCloneNodeTypeDOMException();
    expect(e.code).toEqual(e.DATA_CLONE_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153

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

  test('index size', () => {
    const e = new IndexSizeDOMException();
    expect(e.code).toEqual(e.INDEX_SIZE_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('not supported', () => {
    const e = new NotSupportedDOMException();
    expect(e.code).toEqual(e.NOT_SUPPORTED_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 140..143
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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

  test('quota exceeded', () => {
    const e = new QuotaExceededDOMException();
    expect(e.code).toEqual(e.QUOTA_EXCEEDED_ERR);
  });
Severity: Major
Found in __tests__/dom-exception.ts and 25 other locations - About 35 mins to fix
__tests__/dom-exception.ts on lines 30..33
__tests__/dom-exception.ts on lines 35..38
__tests__/dom-exception.ts on lines 40..43
__tests__/dom-exception.ts on lines 45..48
__tests__/dom-exception.ts on lines 50..53
__tests__/dom-exception.ts on lines 55..58
__tests__/dom-exception.ts on lines 60..63
__tests__/dom-exception.ts on lines 65..68
__tests__/dom-exception.ts on lines 70..73
__tests__/dom-exception.ts on lines 75..78
__tests__/dom-exception.ts on lines 80..83
__tests__/dom-exception.ts on lines 85..88
__tests__/dom-exception.ts on lines 90..93
__tests__/dom-exception.ts on lines 95..98
__tests__/dom-exception.ts on lines 100..103
__tests__/dom-exception.ts on lines 105..108
__tests__/dom-exception.ts on lines 110..113
__tests__/dom-exception.ts on lines 115..118
__tests__/dom-exception.ts on lines 120..123
__tests__/dom-exception.ts on lines 125..128
__tests__/dom-exception.ts on lines 130..133
__tests__/dom-exception.ts on lines 135..138
__tests__/dom-exception.ts on lines 145..148
__tests__/dom-exception.ts on lines 150..153
__tests__/dom-exception.ts on lines 155..158

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