RubyLouvre/anu

View on GitHub
packages/core/__tests__/ReactChildren-test.js

Summary

Maintainability
F
3 wks
Test Coverage

File ReactChildren-test.js has 1127 lines of code (exceeds 250 allowed). Consider refactoring.
Open


"use strict";

describe("ReactChildren", () => {
    let React;
Severity: Major
Found in packages/core/__tests__/ReactChildren-test.js - About 2 days to fix

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

        it('should be called for each child in an iterable without keys', () => {
            const threeDivIterable = {
                '@@iterator': function () {
                    let i = 0;
                    return {
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 2 days to fix
    packages/core/__tests__/ReactChildren-test.js on lines 666..715

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

    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('should be called for each child in an iterable without keys', () => {
            const threeDivIterable = {
                '@@iterator': function () {
                    let i = 0;
                    return {
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 2 days to fix
    packages/core/__tests__/ReactChildren-test.js on lines 614..663

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

    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("should pass key to returned component", () => {
            var mapFn = function (kid, index) {
                return <div>{kid}</div>;
            };
    
    
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 day to fix
    packages/core/__tests__/ReactChildren-test.js on lines 851..865

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

    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('should pass key to returned component', () => {
            const mapFn = function (kid, index) {
                return <div>{kid}</div>;
            };
    
    
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 day to fix
    packages/core/__tests__/ReactChildren-test.js on lines 393..407

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

    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('should invoke callback with the right context', () => {
            let lastContext;
            const callback = function (kid, index) {
                lastContext = this;
                return this;
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 day to fix
    packages/core/__tests__/ReactChildren-test.js on lines 409..428

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

    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("should invoke callback with the right context", () => {
            var lastContext;
            var callback = function (kid, index) {
                lastContext = this;
                return this;
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 day to fix
    packages/core/__tests__/ReactChildren-test.js on lines 867..890

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

    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

            function assertCalls() {
                expect(callback.calls.count()).toBe(9);
                expect(callback).toHaveBeenCalledWith(div, 0);
                expect(callback).toHaveBeenCalledWith(span, 1);
                expect(callback).toHaveBeenCalledWith(a, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 7 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 502..514

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

    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

            function assertCalls() {
                expect(callback.calls.count()).toBe(9);
                expect(callback).toHaveBeenCalledWith(div, 0);
                expect(callback).toHaveBeenCalledWith(span, 1);
                expect(callback).toHaveBeenCalledWith(a, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 7 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 144..156

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

    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

            function assertCalls() {
                expect(callback.calls.count()).toBe(6);
                expect(callback).toHaveBeenCalledWith(zero, 0);
                expect(callback).toHaveBeenCalledWith(one, 1);
                expect(callback).toHaveBeenCalledWith(two, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 5 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 184..193

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

    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

            function assertCalls() {
                expect(callback.calls.count()).toBe(6);
                expect(callback).toHaveBeenCalledWith(zero, 0);
                expect(callback).toHaveBeenCalledWith(one, 1);
                expect(callback).toHaveBeenCalledWith(two, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 5 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 549..558

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

    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

            function assertCalls() {
                expect(callback.calls.count()).toBe(3);
                expect(callback).toHaveBeenCalledWith(<div key="#1" />, 0);
                expect(callback).toHaveBeenCalledWith(<div key="#2" />, 1);
                expect(callback).toHaveBeenCalledWith(<div key="#3" />, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 4 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 299..305

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 129.

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

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

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

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

    Refactorings

    Further Reading

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

            function assertCalls() {
                expect(callback.calls.count()).toBe(3);
                expect(callback).toHaveBeenCalledWith(<div key="#1" />, 0);
                expect(callback).toHaveBeenCalledWith(<div key="#2" />, 1);
                expect(callback).toHaveBeenCalledWith(<div key="#3" />, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 4 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 741..747

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 129.

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

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

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

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

    Refactorings

    Further Reading

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

            function assertCalls() {
                expect(callback).toHaveBeenCalledWith(zero, 0);
                expect(callback).toHaveBeenCalledWith(one, 1);
                expect(callback).toHaveBeenCalledWith(two, 2);
                expect(callback).toHaveBeenCalledWith(three, 3);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 453..460

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

    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

            function assertCalls() {
                expect(callback).toHaveBeenCalledWith(zero, 0);
                expect(callback).toHaveBeenCalledWith(one, 1);
                expect(callback).toHaveBeenCalledWith(two, 2);
                expect(callback).toHaveBeenCalledWith(three, 3);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 93..100

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

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

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

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

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

    Refactorings

    Further Reading

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

            const threeDivIterable = {
                '@@iterator': function () {
                    let i = 0;
                    return {
                        next: function () {
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 276..289

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

    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

            var threeDivIterable = {
                "@@iterator": function () {
                    var i = 0;
                    return {
                        next: function () {
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 718..731

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

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

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

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

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

    Refactorings

    Further Reading

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

                const assertCalls = function () {
                    expect(callback.calls.count()).toBe(3);
                    expect(callback).toHaveBeenCalledWith(5, 0);
                    expect(callback).toHaveBeenCalledWith(12, 1);
                    expect(callback).toHaveBeenCalledWith(13, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 337..343

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

    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

                var assertCalls = function () {
                    expect(callback.calls.count()).toBe(3);
                    expect(callback).toHaveBeenCalledWith(5, 0);
                    expect(callback).toHaveBeenCalledWith(12, 1);
                    expect(callback).toHaveBeenCalledWith(13, 2);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 787..793

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

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

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

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

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

    Refactorings

    Further Reading

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

            const reversed = React.Children.toArray([
                [<div key="camel" />, <div key="banana" />, <div key="apple" />],
                [<div key="deli" />, <div key="camel" />, <div key="banana" />],
            ]);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 1190..1193

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

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

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

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

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

    Refactorings

    Further Reading

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

            const flattened = React.Children.toArray([
                [<div key="apple" />, <div key="banana" />, <div key="camel" />],
                [<div key="banana" />, <div key="camel" />, <div key="deli" />],
            ]);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 3 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 1199..1202

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

    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

            function assertCalls() {
                expect(callback.calls.count()).toBe(2, 0);
                expect(callback).toHaveBeenCalledWith('a', 0);
                expect(callback).toHaveBeenCalledWith(13, 1);
                callback.calls.reset();
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 2 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 375..380

    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

            function assertCalls() {
                expect(callback.calls.count()).toBe(2, 0);
                expect(callback).toHaveBeenCalledWith("a", 0);
                expect(callback).toHaveBeenCalledWith(13, 1);
                callback.calls.reset();
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 2 hrs to fix
    packages/core/__tests__/ReactChildren-test.js on lines 829..834

    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

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                expect(index).toBe(0);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 15..19

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 66.

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

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

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

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

    Refactorings

    Further Reading

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                expect(index).toBe(0);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 37..41

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 66.

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

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

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

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

    Refactorings

    Further Reading

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

            expect(mappedChildren).toEqual([<div key=".0:$keyZero" />, <div key=".0:$keyTwo" />, <div key=".1:$keyFour" />, <div key=".$keyFive" />]);
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 569..574

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 64.

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

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

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

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

    Refactorings

    Further Reading

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

            expect(mappedChildren).toEqual([
                <div key=".0:$keyZero" />,
                <div key=".0:$keyTwo" />,
                <div key=".1:$keyFour" />,
                <div key=".$keyFive" />,
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 200..200

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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

            const instance = (
                <div>
                    {div}
                    {[[span]]}
                    {[a]}
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 130..142

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

            var instance = (
                <div>
                    {div}
                    {[[span]]}
                    {[a]}
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 488..500

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

            expect([
                mappedChildren[0].key,
                mappedChildren[1].key,
                mappedChildren[2].key,
                mappedChildren[3].key,
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 935..940

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

    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

            expect([
                mappedChildren[0].key,
                mappedChildren[1].key,
                mappedChildren[2].key,
                mappedChildren[3].key,
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 1 hr to fix
    packages/core/__tests__/ReactChildren-test.js on lines 1009..1019

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

    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

            function assertCalls() {
                expect(callback).toHaveBeenCalledWith(zeroForceKey, 0);
                expect(callback).toHaveBeenCalledWith(oneForceKey, 1);
                callback.calls.reset();
            }
    Severity: Minor
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 55 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 218..222

    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

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

            function assertCalls() {
                expect(callback).toHaveBeenCalledWith(zeroForceKey, 0);
                expect(callback).toHaveBeenCalledWith(oneForceKey, 1);
                callback.calls.reset();
            }
    Severity: Minor
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 55 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 593..597

    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

            expect(mappedChildren).toEqual([<div key=".$divNode" />,
            <span key=".1:0:$spanNode" />,
            <a key=".2:$aNode" />, "string", 1234]);
    Severity: Minor
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 55 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 525..531

    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

            expect(mappedChildren).toEqual([
                <div key=".$divNode" />,
                <span key=".1:0:$spanNode" />,
                <a key=".2:$aNode" />,
                'string',
    Severity: Minor
    Found in packages/core/__tests__/ReactChildren-test.js and 1 other location - About 55 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 163..165

    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

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 332..335
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 332..335
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 332..335

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 332..335
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

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

                var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                    expect(this).toBe(context);
                    return kid;
                });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 332..335
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 332..335
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 207..210
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 332..335
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

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

            var callback = jasmine.createSpy().and.callFake(function (kid, index) {
                expect(this).toBe(context);
                return kid;
            });
    Severity: Major
    Found in packages/core/__tests__/ReactChildren-test.js and 8 other locations - About 50 mins to fix
    packages/core/__tests__/ReactChildren-test.js on lines 55..58
    packages/core/__tests__/ReactChildren-test.js on lines 78..81
    packages/core/__tests__/ReactChildren-test.js on lines 126..129
    packages/core/__tests__/ReactChildren-test.js on lines 177..180
    packages/core/__tests__/ReactChildren-test.js on lines 250..253
    packages/core/__tests__/ReactChildren-test.js on lines 292..295
    packages/core/__tests__/ReactChildren-test.js on lines 332..335
    packages/core/__tests__/ReactChildren-test.js on lines 370..373

    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

    There are no issues that match your filters.

    Category
    Status