aurelia/aurelia

View on GitHub
packages/__tests__/src/2-runtime/array-observer.spec.ts

Summary

Maintainability
F
1 mo
Test Coverage

File array-observer.spec.ts has 1587 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  ArrayObserver,
  copyIndexMap,
  ICollectionSubscriber,
  IndexMap,
Severity: Major
Found in packages/__tests__/src/2-runtime/array-observer.spec.ts - About 4 days to fix

    Avoid deeply nested control flow statements.
    Open

                    if (compareFn !== undefined) {
                      // a browser may wrap a custom sort function to normalize the results
                      // so don't consider this a failed test, but just warn so we know about it
                      let differences = 0;
                      let i2 = 0;
    Severity: Major
    Found in packages/__tests__/src/2-runtime/array-observer.spec.ts - About 45 mins to fix

      Function verifyChanges has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function verifyChanges(arr: number[], fn: (arr: number[]) => void, existing: number[], deletedIndices?: number[], deletedItems?: number[]) {
      Severity: Minor
      Found in packages/__tests__/src/2-runtime/array-observer.spec.ts - About 35 mins to fix

        Function getValueFactory has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        function getValueFactory(getNumber: (i: number) => unknown, type: string, types: string[]): (i: number) => unknown {
          let factories: ((i: number) => unknown)[];
          switch (type) {
            case 'undefined':
              return () => undefined;
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function handleCollectionChange has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          public handleCollectionChange(collection: Collection, indexMap: IndexMap): void {
            const newArr = this.newArr;
            const oldArr = this.oldArr;
            const oldArrCopy = oldArr.slice();
        
        
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

          describe(`observePush`, function () {
            const initArr = [[], [1], [1, 2]];
            const itemsArr = [undefined, [], [1], [1, 2]];
            const repeatArr = [1, 2];
        
        
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 3 days to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1533..1588

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

        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

          describe(`observeUnshift`, function () {
            const initArr = [[], [1], [1, 2]];
            const itemsArr = [undefined, [], [1], [1, 2]];
            const repeatArr = [1, 2];
        
        
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 3 days to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1475..1531

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

        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

          describe(`observeShift`, function () {
            const initArr = [[], [1], [1, 2]];
            const repeatArr = [1, 2, 3, 4];
        
            eachCartesianJoin(
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 days to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1590..1630

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

        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

          describe(`observePop`, function () {
            const initArr = [[], [1], [1, 2]];
            const repeatArr = [1, 2, 3, 4];
        
            eachCartesianJoin(
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 days to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1632..1672

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice each item with two new items and sort desc in-between', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(5), S(6));
                  arr.sort(desc);
                  arr.splice(2, 1, S(7), S(8));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 7 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1251..1262
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1277..1288

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice each item with two new items and sort alternating asc & desc in-between', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(5), S(6));
                  arr.sort(asc);
                  arr.splice(2, 1, S(7), S(8));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 7 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1251..1262
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1264..1275

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice each item with two new items and sort asc in-between', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(5), S(6));
                  arr.sort(asc);
                  arr.splice(2, 1, S(7), S(8));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 7 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1264..1275
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1277..1288

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the first three items each with two new items and sort alternating asc & desc in-between', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(5), S(6));
                  arr.sort(asc);
                  arr.splice(2, 1, S(7), S(8));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1158..1167
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1169..1178

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the first three items each with two new items and sort desc in-between', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(5), S(6));
                  arr.sort(desc);
                  arr.splice(2, 1, S(7), S(8));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1158..1167
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1180..1189

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the first three items each with two new items and sort asc in-between', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(5), S(6));
                  arr.sort(asc);
                  arr.splice(2, 1, S(7), S(8));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1169..1178
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1180..1189

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice each item with two new items and sort asc in-between', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.splice(0, 1, S(1), S(2));
                  arr.sort(asc);
                  arr.splice(2, 1, S(3), S(4));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 921..930
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 932..941

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice each item with two new items and sort desc in-between', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.splice(0, 1, S(1), S(2));
                  arr.sort(desc);
                  arr.splice(2, 1, S(3), S(4));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 910..919
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 932..941

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice each item with two new items and sort alternating asc & desc in-between', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.splice(0, 1, S(1), S(2));
                  arr.sort(asc);
                  arr.splice(2, 1, S(3), S(4));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 910..919
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 921..930

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

        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('splice each item with two new items', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(1), S(2));
                  arr.splice(2, 1, S(3), S(4));
                  arr.splice(4, 1, S(5), S(6));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1290..1297

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

        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('splice each item with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(3, 1, S(7), S(8));
                  arr.splice(2, 1, S(5), S(6));
                  arr.splice(1, 1, S(3), S(4));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 5 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1242..1249

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the last three items each with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(3, 1, S(5), S(6));
                  arr.splice(2, 1, S(3), S(4));
                  arr.splice(1, 1, S(1), S(2));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 3 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1150..1156
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1191..1197

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the first three items each with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(2, 1, S(5), S(6));
                  arr.splice(1, 1, S(3), S(4));
                  arr.splice(0, 1, S(1), S(2));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 3 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1150..1156
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1199..1205

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

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the first three items each with two new items', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(0, 1, S(1), S(2));
                  arr.splice(2, 1, S(3), S(4));
                  arr.splice(4, 1, S(5), S(6));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 3 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1191..1197
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1199..1205

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

        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('splice each item with two new items', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.splice(0, 1, S(1), S(2));
                  arr.splice(2, 1, S(3), S(4));
                  arr.splice(4, 1, S(5), S(6));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 3 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 950..956

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

        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('splice each item with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.splice(2, 1, S(5), S(6));
                  arr.splice(1, 1, S(3), S(4));
                  arr.splice(0, 1, S(1), S(2));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 3 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 902..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 109.

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

              it('splice the first two items each with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(1, 1, S(5), S(6));
                  arr.splice(0, 1, S(7), S(8));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1214..1219
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1221..1226
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1228..1233
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1235..1240

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 92.

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the last two items each with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(3, 1, S(5), S(6));
                  arr.splice(2, 1, S(7), S(8));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1207..1212
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1214..1219
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1228..1233
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1235..1240

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 92.

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the first and third items each with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(2, 1, S(5), S(6));
                  arr.splice(0, 1, S(7), S(8));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1207..1212
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1214..1219
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1221..1226
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1235..1240

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 92.

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the middle two items each with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(2, 1, S(5), S(6));
                  arr.splice(1, 1, S(7), S(8));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1207..1212
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1221..1226
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1228..1233
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1235..1240

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 92.

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

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

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

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

        Refactorings

        Further Reading

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

              it('splice the second and fourth items each with two new items in reverse order', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(3, 1, S(5), S(6));
                  arr.splice(1, 1, S(7), S(8));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1207..1212
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1214..1219
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1221..1226
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1228..1233

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 92.

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

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

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

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

        Refactorings

        Further Reading

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

              it('push + push + pop', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.push(S(6));
                  arr.pop();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1121..1127

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

        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('push + push + shift', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.push(S(6));
                  arr.shift();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1106..1112

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

        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('splice the middle item with three new items and sort desc', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(1, 1, S(2), S(5), S(6));
                  arr.sort(desc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1299..1304

        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('splice the middle item with three new items and sort asc', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.splice(1, 1, S(2), S(5), S(6));
                  arr.sort(asc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1306..1311

        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('push + push + pop', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.push(S(5));
                  arr.pop();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 873..879

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

        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('push + push + shift', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.push(S(5));
                  arr.shift();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 858..864

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

        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('splice the middle item with three new items and sort asc', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.splice(1, 1, S(2), S(4), S(5));
                  arr.sort(asc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 965..970

        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

              it('splice the middle item with three new items and sort desc', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.splice(1, 1, S(2), S(4), S(5));
                  arr.sort(desc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 958..963

        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

              it('push + push + pop', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.push(S(4));
                  arr.pop();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 746..752

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

              it('2x unshift', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.unshift(S(5));
                  arr.unshift(S(6));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1069..1074

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

              it('push + push + shift', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.push(S(4));
                  arr.shift();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 731..737

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

              it('2x push', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.push(S(6));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 2 hrs to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1076..1081

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 78.

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

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

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

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

        Refactorings

        Further Reading

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

              it('push + sort(asc)', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.sort(asc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1342..1347

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

        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('push + sort(desc)', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.sort(desc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1349..1354

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

        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('unshift + shift', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.unshift(S(5));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1092..1097
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1114..1119
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1320..1325

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

        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('push + reverse', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.reverse();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1092..1097
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1099..1104
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1114..1119

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

        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('push + shift', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1092..1097
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1099..1104
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1320..1325

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

        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('push + pop', function () {
                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.pop();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1099..1104
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1114..1119
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1320..1325

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

        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('2x unshift', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.unshift(S(4));
                  arr.unshift(S(5));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 821..826

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

        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('push + push + shift', function () {
                verifyChanges([S(1)], arr => {
                  arr.push(S(2));
                  arr.push(S(3));
                  arr.shift();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 655..661

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

        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('push + push + pop', function () {
                verifyChanges([S(1)], arr => {
                  arr.push(S(2));
                  arr.push(S(3));
                  arr.pop();
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 670..676

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

        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('2x push', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.push(S(5));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 828..833

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

        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('replace inner item + swap outer items', function () {
                  verifyChanges([S(1), S(3), S(4)], arr => {
                    arr.splice(1, 1, S(2));
                    arr.reverse();
                  });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1059..1064

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

        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('add inner item + swap outer items', function () {
                  verifyChanges([S(1), S(3), S(4)], arr => {
                    arr.splice(1, 0, S(2));
                    arr.reverse();
                  });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1045..1050

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

        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('swap outer items + replace inner item', function () {
                  verifyChanges([S(1), S(3), S(4)], arr => {
                    arr.reverse();
                    arr.splice(1, 1, S(2));
                  });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1052..1057

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

        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('swap outer items + add inner item', function () {
                  verifyChanges([S(1), S(3), S(4)], arr => {
                    arr.reverse();
                    arr.splice(1, 0, S(2));
                  });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1038..1043

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

        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('push + sort(asc)', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.sort(asc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 994..999

        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

              it('push + sort(desc)', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.sort(desc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1001..1006

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

              it('push + shift', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 844..849
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 851..856
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 972..977

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

        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('push + pop', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.pop();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 851..856
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 866..871
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 972..977

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

        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('unshift + shift', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.unshift(S(4));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 844..849
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 866..871
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 972..977

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

        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('push + reverse', function () {
                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.reverse();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 844..849
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 851..856
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 866..871

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

        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('2x push', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.push(S(4));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 701..706

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

        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('2x unshift', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.unshift(S(3));
                  arr.unshift(S(4));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 694..699

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

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

                verifyChanges([S(1)], arr => {
                  arr.push(S(2));
                  arr.push(S(3));
                  arr.unshift(S(4));
                  arr.unshift(S(5));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 586..591
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 709..714
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 836..841
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1084..1089

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

                verifyChanges([], arr => {
                  arr.push(S(1));
                  arr.push(S(2));
                  arr.unshift(S(3));
                  arr.unshift(S(4));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 633..638
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 709..714
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 836..841
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1084..1089

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

                verifyChanges([S(1), S(2), S(3)], arr => {
                  arr.push(S(4));
                  arr.push(S(5));
                  arr.unshift(S(6));
                  arr.unshift(S(7));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 586..591
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 633..638
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 709..714
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1084..1089

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

                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.push(S(4));
                  arr.unshift(S(5));
                  arr.unshift(S(6));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 586..591
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 633..638
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 836..841
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1084..1089

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

                verifyChanges([S(1), S(2), S(3), S(4)], arr => {
                  arr.push(S(5));
                  arr.push(S(6));
                  arr.unshift(S(7));
                  arr.unshift(S(8));
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 4 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 586..591
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 633..638
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 709..714
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 836..841

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

              it('push + sort(desc)', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.sort(desc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 797..802

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

              it('push + sort(asc)', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.sort(asc);
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 790..795

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

              it('unshift + shift', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.unshift(S(3));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 717..722
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 739..744
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 768..773

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

              it('push + pop', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.pop();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 724..729
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 739..744
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 768..773

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

              it('push + shift', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 717..722
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 724..729
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 768..773

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

              it('push + reverse', function () {
                verifyChanges([S(1), S(2)], arr => {
                  arr.push(S(3));
                  arr.reverse();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 3 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 717..722
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 724..729
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 739..744

        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('2x push', function () {
                verifyChanges([S(1)], arr => {
                  arr.push(S(2));
                  arr.push(S(3));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 625..630

        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('2x unshift', function () {
                verifyChanges([S(1)], arr => {
                  arr.unshift(S(2));
                  arr.unshift(S(3));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 618..623

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

              it('unshift + shift', function () {
                verifyChanges([S(1)], arr => {
                  arr.unshift(S(2));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 641..646
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 663..668

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

              it('push + shift', function () {
                verifyChanges([S(1)], arr => {
                  arr.push(S(2));
                  arr.shift();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 641..646
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 648..653

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

              it('push + pop', function () {
                verifyChanges([S(1)], arr => {
                  arr.push(S(2));
                  arr.pop();
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 648..653
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 663..668

        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('2x unshift', function () {
                verifyChanges([], arr => {
                  arr.unshift(1);
                  arr.unshift(2);
                }, [-2, -2]);
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 197..202

        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('2x unshift', function () {
                verifyChanges([], arr => {
                  arr.unshift(S(1));
                  arr.unshift(S(2));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.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 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('2x push', function () {
                verifyChanges([], arr => {
                  arr.push(S(1));
                  arr.push(S(2));
                });
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 578..583

        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('2x push', function () {
                verifyChanges([], arr => {
                  arr.push(1);
                  arr.push(2);
                }, [-2, -2]);
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 1 hr to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 204..209

        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(`size=${padRight(init.length, 2)} start=${padRight(start, 9)} deleteCount=${padRight(deleteCount, 9)} itemCount=${padRight(items?.length, 9)} repeat=${repeat} - behaves as native`, function () {
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 55 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1723..1723

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

        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(`size=${padRight(init.length, 2)} start=${padRight(start, 9)} deleteCount=${padRight(deleteCount, 9)} itemCount=${padRight(items?.length, 9)} repeat=${repeat} - tracks changes`, function () {
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 55 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 1690..1690

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

        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('push + pop', function () {
                verifyChanges([], arr => {
                  arr.push(S(1));
                  arr.pop();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 55 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 601..606

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

              it('unshift + shift', function () {
                verifyChanges([], arr => {
                  arr.unshift(S(1));
                  arr.shift();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 55 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 594..599

        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

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

                assert.deepStrictEqual(
                  map,
                  Object.assign([-2, -2, 2], { deletedIndices: [1, 0], deletedItems: [2, 1], isIndexMap: true })
                );
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 50 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 510..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 51.

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

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

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

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

        Refactorings

        Further Reading

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

                verifyChanges([], arr => {
                  arr.push(1);
                  arr.push(2);
                  arr.unshift(3);
                  arr.unshift(4);
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 50 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 259..264
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 335..340

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

        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

              assert.deepStrictEqual(
                map,
                Object.assign([-2, -2, 2], { deletedIndices: [1, 0], deletedItems: [2, 1], isIndexMap: true })
              );
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 50 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 504..507

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

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

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

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

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

        Refactorings

        Further Reading

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

                verifyChanges([1], arr => {
                  arr.push(2);
                  arr.push(3);
                  arr.unshift(4);
                  arr.unshift(5);
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 50 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 212..217
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 335..340

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

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

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

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

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

        Refactorings

        Further Reading

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

                verifyChanges([1, 2], arr => {
                  arr.push(3);
                  arr.push(4);
                  arr.unshift(5);
                  arr.unshift(6);
        Severity: Major
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 2 other locations - About 50 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 212..217
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 259..264

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

        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('push + pop', function () {
                verifyNoChanges([1, 2], arr => {
                  arr.push(3);
                  arr.pop();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 50 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 350..355

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

        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('unshift + shift', function () {
                verifyNoChanges([1, 2], arr => {
                  arr.unshift(3);
                  arr.shift();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 50 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 343..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 51.

        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('push + pop', function () {
                verifyNoChanges([1], arr => {
                  arr.push(2);
                  arr.pop();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 45 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 274..279

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 50.

        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('unshift + shift', function () {
                verifyNoChanges([1], arr => {
                  arr.unshift(2);
                  arr.shift();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 45 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 267..272

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

        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('push + pop', function () {
                verifyNoChanges([], arr => {
                  arr.push(1);
                  arr.pop();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 40 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 227..232

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 49.

        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('unshift + shift', function () {
                verifyNoChanges([], arr => {
                  arr.unshift(1);
                  arr.shift();
                });
        Severity: Minor
        Found in packages/__tests__/src/2-runtime/array-observer.spec.ts and 1 other location - About 40 mins to fix
        packages/__tests__/src/2-runtime/array-observer.spec.ts on lines 220..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 49.

        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