aurelia/aurelia

View on GitHub
packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts

Summary

Maintainability
F
2 wks
Test Coverage

File arrow-fn.spec.ts has 466 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { BindingBehavior, ValueConverter, CustomAttribute, INode } from '@aurelia/runtime-html';
import { assert, createFixture } from '@aurelia/testing';

describe('3-runtime-html/arrow-fn.spec.ts', function () {

Severity: Minor
Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts - About 7 hrs to fix

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

        it('observes on .filter()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.filter(i => i > 1)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .at()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.at(-1)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .flatMap()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.flatMap(i => [i + 1])}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .includes()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.includes(2)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .slice()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.slice(0)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .some()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.some(i => i > 1)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497

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

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

        it('observes on repeat + .map()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`<div repeat.for='i of items.map(i => i + 1)'>\${i}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on <let> + .map()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`<let i.bind='items.map(i => i + 1)'></let>\${i}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .join()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.join(', ')}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .indexOf()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.indexOf(2)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .reduceRight()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.reduceRight((acc, i) => acc + i)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .lastIndexOf()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.lastIndexOf(2)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .findIndex()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.findIndex(x => x === 2)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .find()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.find(x => x === 2)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .reduce()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.reduce((acc, i) => acc + i, 0)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .map()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.map(i => i + 1)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 483..497
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

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

        it('observes on .every()', function () {
          const { component, flush, assertText } = createFixture
            .component({ items: [1] })
            .html`\${items.every(i => i < 2)}`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 16 other locations - About 5 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 219..233
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 235..249
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 251..265
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 267..281
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 291..305
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 307..321
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 323..337
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 339..353
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 355..369
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 371..385
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 403..417
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 419..433
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 435..449
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 451..465
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 467..481
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 499..513

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

    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('can flatMap nested fn', function () {
        const { assertText } = createFixture
            .component({
              items: [
                { name: 'a1', children: [{ name: 'b1', children: [{ name: 'c1' }] }] },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 87..98

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

    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('can flatMap nested fn and access parent scope', function () {
        const { assertText } = createFixture
            .component({
              items: [
                { name: 'a1', children: [{ name: 'b1', children: [{ name: 'c1' }] }] },
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 74..85

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

    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

          const { component, assertText } = createFixture
            .component({ items: [{ id: 4, }, { id: 5, }, { id: 3, }, { id: 1 }] })
            .html`<div repeat.for='i of items.sort((a, b) => a.id - b.id)'>\${i.id},`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 536..539

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

    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

          const { component, assertText } = createFixture
            .component({ items: [{ id: 4, }, { id: 5, }, { id: 3, }, { id: 1 }] })
            .html`<div repeat.for='i of items.slice(0).sort((a, b) => a.id - b.id)'>\${i.id},`
            .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 1 other location - About 2 hrs to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 556..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 81.

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

      it('can access the correct scope via $parent', function () {
        const { assertText } = createFixture
          .html`<div with.bind='{a:2}'><div with.bind='{a:3}'><div with.bind='{a:4}'>\${(a => $parent.a)('5')}</div></div></div>`
          .component({ a: '1' })
          .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 6 other locations - About 1 hr to fix
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 259..266
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 268..275
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 100..106
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 108..114
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 124..130
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 132..138

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

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

      it('can access the correct scope via $parent in nested arrow', function () {
        const { assertText } = createFixture
          .html`<div with.bind='{a:2}'><div with.bind='{a:3}'><div with.bind='{a:4}'>\${(a => a => $parent.a)('6')('5')}</div></div></div>`
          .component({ a: '1' })
          .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 6 other locations - About 1 hr to fix
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 259..266
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 268..275
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 100..106
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 108..114
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 116..122
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 132..138

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

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

      it('can access the correct scope via $this', function () {
        const { assertText } = createFixture
          .html`\${(a => $this.a)('2')}`
          .component({ a: '1' })
          .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 6 other locations - About 1 hr to fix
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 259..266
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 268..275
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 108..114
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 116..122
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 124..130
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 132..138

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

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

      it('can access the correct scope via $this in nested arrow', function () {
        const { assertText } = createFixture
          .html`\${(a => a => $this.a)('3')('2')}`
          .component({ a: '1' })
          .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 6 other locations - About 1 hr to fix
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 259..266
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 268..275
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 100..106
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 116..122
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 124..130
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 132..138

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

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

      it('can access the correct scope via $parent.$parent in nested arrow', function () {
        const { assertText } = createFixture
          .html`<div with.bind='{a:2}'><div with.bind='{a:3}'><div with.bind='{a:4}'>\${(a => a => $parent.$parent.a)('6')('5')}</div></div></div>`
          .component({ a: '1' })
          .build();
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 6 other locations - About 1 hr to fix
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 259..266
    packages/__tests__/src/2-runtime/ast.integration.spec.ts on lines 268..275
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 100..106
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 108..114
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 116..122
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 124..130

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

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

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

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

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

    Refactorings

    Further Reading

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

      it('works with IIFE', function () {
        const { assertText } = createFixture
          .html`\${(a => a)(1)}`
          .build();
        assertText('1');
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 3 other locations - About 55 mins to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 26..31
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 60..65
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 67..72

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

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

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

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

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

    Refactorings

    Further Reading

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

      it('can call nested arrow inline', function () {
        const { assertText } = createFixture
          .html`\${(a => b => a + b)(1)(2)}`
          .build();
        assertText('3');
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 3 other locations - About 55 mins to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 19..24
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 26..31
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 67..72

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

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

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

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

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

    Refactorings

    Further Reading

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

      it('works with paren wrapping {}', function () {
        const { assertText } = createFixture
          .html`\${(((e) => ({ a: e.v }))({ v: 1 })).a}`
          .build();
        assertText('1');
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 3 other locations - About 55 mins to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 19..24
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 60..65
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 67..72

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

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

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

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

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

    Refactorings

    Further Reading

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

      it('can call arrow inline with rest', function () {
        const { assertText } = createFixture
          .html`\${((...args) => args[0] + args[1] + args[2])(1, 2, 3)}`
          .build();
        assertText('6');
    Severity: Major
    Found in packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts and 3 other locations - About 55 mins to fix
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 19..24
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 26..31
    packages/__tests__/src/3-runtime-html/arrow-fn.spec.ts on lines 60..65

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

    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