aurelia/aurelia

View on GitHub
packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts

Summary

Maintainability
F
1 wk
Test Coverage

File custom-attributes.spec.ts has 859 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { DI, IContainer, Registration, resolve } from '@aurelia/kernel';
import {
  CustomAttribute,
  IAurelia,
  IHydratedComponentController,
Severity: Major
Found in packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts - About 2 days to fix

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

        it('works with coercer bindable', function () {
          let setCount = 0;
          const values = [];
          @customAttribute('my-attr')
          class MyAttr {
    packages/__tests__/src/3-runtime-html/custom-elements.spec.ts on lines 528..559

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

    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

        @customAttribute({ name: 'foo5', aliases: ['foo53'] })
        @alias(...['foo51', 'foo52'])
        class Fooatt5 {
          @bindable({ primary: true })
          public value: any;
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 32..42

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

    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

        @customAttribute({ name: 'foo4', aliases: ['foo43'] })
        @alias('foo41', 'foo42')
        class Fooatt4 {
          @bindable({ primary: true })
          public value: any;
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 44..54

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('works with resolve and inheritance', function () {
          class Base { au = resolve(IAurelia); }
          @customAttribute('attr')
          class Attr extends Base {}
    
    
    packages/__tests__/src/3-runtime-html/custom-elements.spec.ts on lines 464..474

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('does not invoke change handler when starts with commands', async function () {
          const { fooVm, tearDown } = setupChangeHandlerTest('<div foo.bind="prop"></foo>');
          assert.strictEqual(fooVm.propChangedCallCount, 0);
          fooVm.prop = '5';
          assert.strictEqual(fooVm.propChangedCallCount, 1);
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 252..258

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('does not invoke change handler when starts with plain usage', async function () {
          const { fooVm, tearDown } = setupChangeHandlerTest('<div foo="prop"></div>');
          assert.strictEqual(fooVm.propChangedCallCount, 0);
          fooVm.prop = '5';
          assert.strictEqual(fooVm.propChangedCallCount, 1);
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 260..266

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

    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

          @customAttribute('my-attr')
          class MyAttr {
            v = resolve(IExample);
            host = resolve(INode) as HTMLElement;
    
    
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 936..944

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

    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

          @customElement('my-ce')
          class MyCe {
            e = resolve(IExample);
            host = resolve(INode) as HTMLElement;
    
    
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 900..908

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

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

        it('Simple Alias (1st position) works on custom attribute', async function () {
          const options = createFixture('<template> <div foo41.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('Simple Alias (2nd position) works on custom attribute', async function () {
          const options = createFixture('<template> <div foo42.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('2 aliases and attribute alias original works', async function () {
          const options = createFixture('<template> <div foo44.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('Simple spread Alias doesn\'t break original custom attribute', async function () {
          const options = createFixture('<template> <div foo5.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('2 aliases and attribute alias first alias deco works', async function () {
          const options = createFixture('<template> <div foo411.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('2 aliases and attribute alias def alias works', async function () {
          const options = createFixture('<template> <div foo431.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('Simple spread Alias doesn\'t break def alias works on custom attribute', async function () {
          const options = createFixture('<template> <div foo53.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('Simple spread Alias (2nd position) works on custom attribute', async function () {
          const options = createFixture('<template> <div foo52.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('2 aliases and attribute alias second alias works', async function () {
          const options = createFixture('<template> <div foo422.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('Simple spread Alias (1st position) works on custom attribute', async function () {
          const options = createFixture('<template> <div foo51.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('Simple Alias doesn\'t break def alias works on custom attribute', async function () {
          const options = createFixture('<template> <div foo43.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 127..131
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

        it('Simple Alias doesn\'t break original custom attribute', async function () {
          const options = createFixture('<template> <div foo4.bind="value"></div> </template>', app, resources);
          assert.strictEqual(options.appHost.firstElementChild.getAttribute('test'), 'wOOt');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 61..65
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 67..71
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 73..77
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 79..83
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 85..89
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 91..95
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 97..101
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 103..107
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 109..113
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 115..119
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 121..125
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 59..63
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 65..69
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 71..75
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 77..81
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 83..87
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 89..93
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 95..99
    packages/__tests__/src/3-runtime-html/value-converters.spec.ts on lines 101..105

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('binds to the default property correctly', async function () {
          const options = createFixture('<template> <div multi2.bind="value">Initial</div> </template>', app, [Multi2]);
          assert.strictEqual(options.appHost.firstElementChild.textContent, 'a: undefined, b: bound');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 190..194
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 196..200
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 214..219
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 221..225
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 227..231

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('binds to multiple properties correctly', async function () {
          const options = createFixture('<template> <div multi="a.bind: true; b.bind: value">Initial</div> </template>', app, [Multi]);
          assert.strictEqual(options.appHost.firstElementChild.textContent, 'a: true, b: bound');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 196..200
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 202..206
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 214..219
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 221..225
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 227..231

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

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

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

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

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

    Refactorings

    Further Reading

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

          it('works with multi binding syntax', async function () {
    
            const options = createFixture('<template> <div multi3="a.bind: 5; b.bind: 6">Initial</div> </template>', app, [Multi3]);
            assert.strictEqual(options.appHost.firstElementChild.textContent, 'a: undefined, b: a.bind: 5; b.bind: 6');
            await options.tearDown();
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 190..194
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 196..200
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 202..206
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 221..225
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 227..231

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('binds to multiple properties correctly when there’s a default property', async function () {
          const options = createFixture('<template> <div multi2="a.bind: true; b.bind: value">Initial</div> </template>', app, [Multi2]);
          assert.strictEqual(options.appHost.firstElementChild.textContent, 'a: true, b: bound');
          await options.tearDown();
        });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 190..194
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 202..206
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 214..219
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 221..225
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 227..231

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

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

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

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

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

    Refactorings

    Further Reading

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

          it('works with escaped colon', async function () {
            const options = createFixture('<template> <div multi3="http\\://google.com">Initial</div> </template>', app, [Multi3]);
            assert.strictEqual(options.appHost.firstElementChild.textContent, 'a: undefined, b: http\\://google.com');
            await options.tearDown();
          });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 190..194
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 196..200
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 202..206
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 214..219
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 221..225

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

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

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

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

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

    Refactorings

    Further Reading

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

          it('works with URL value', async function () {
            const options = createFixture('<template> <div multi3="http://google.com">Initial</div> </template>', app, [Multi3]);
            assert.strictEqual(options.appHost.firstElementChild.textContent, 'a: undefined, b: http://google.com');
            await options.tearDown();
          });
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 190..194
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 196..200
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 202..206
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 214..219
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 227..231

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

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

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

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

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

    Refactorings

    Further Reading

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

          }, class {
            _m = [{ v: 'hello' }, { v: 'world' }];
            get message() {
              return this._m.map(v => v.v).join(' ');
            }
    packages/__tests__/src/3-runtime-html/custom-elements.spec.ts on lines 571..576

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('finds closest custom attribute when nested multiple dom layers', function () {
          const { assertText } = createFixture(`
            <div foo="1">
              <center>
                <div bar="2"></div>
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 1024..1039

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('finds closest custom attribute when nested multiple dom layers + multiple parent attributes', function () {
          const { assertText } = createFixture(`
            <div foo="1">
              <center>
                <div foo="3">
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 1009..1022

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

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

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

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

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

    Refactorings

    Further Reading

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

          public constructor(private readonly element: INode<Element> = resolve(INode) as INode<Element>) {
            this.element.innerHTML = 'Created';
          }
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 168..170

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

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

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

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

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

    Refactorings

    Further Reading

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

          public constructor(private readonly element: INode<Element> = resolve(INode) as INode<Element>) {
            this.element.innerHTML = 'Created';
          }
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 143..145

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('finds closest custom attribute using view model constructor', function () {
          const { assertText } = createFixture(`<div foo="1"><div bar="2"></div></div>`, class App {}, [Foo, Bar]);
          assertText('1');
        });
    Severity: Minor
    Found in packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts and 1 other location - About 50 mins to fix
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 988..991

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('finds closest custom attribute using string', function () {
          const { assertText } = createFixture(`<div foo="1"><div baz="2"></div></div>`, class App {}, [Foo, Baz]);
          assertText('1');
        });
    Severity: Minor
    Found in packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts and 1 other location - About 50 mins to fix
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 993..996

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

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

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

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

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

    Refactorings

    Further Reading

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

          public propertyChanged(...args: unknown[]): void {
            this.propertyChangedCallCount++;
            this.propertyChangedCallArguments.push(args);
          }
    Severity: Minor
    Found in packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts and 1 other location - About 30 mins to fix
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 320..323

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

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

          public propertyChanged(...args: unknown[]): void {
            this.propertyChangedCallCount++;
            this.propertyChangedCallArguments.push(args);
          }
    Severity: Minor
    Found in packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts and 1 other location - About 30 mins to fix
    packages/__tests__/src/3-runtime-html/custom-attributes.spec.ts on lines 345..348

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status