AugurProject/augur-ui

View on GitHub
src/modules/reports/selectors/select-dispute-outcomes.test.js

Summary

Maintainability
F
1 wk
Test Coverage

File select-dispute-outcomes.test.js has 732 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import sinon from "sinon";
import {
  CATEGORICAL,
  SCALAR,
  YES_NO
Severity: Major
Found in src/modules/reports/selectors/select-dispute-outcomes.test.js - About 1 day to fix

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

      test(`categorical market with invalid disputes`, () => {
        const stakes = [
          {
            payout: [1429, 1429, 1429, 1429, 1429, 1429, 1429],
            isInvalid: true,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 610..647

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

    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

      test(`categorical market with one disputes`, () => {
        const stakes = [
          {
            payout: [10003, 0, 0, 0, 0, 0, 0],
            isInvalid: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 528..559

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 287.

    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

      test(`yes/no  market with one dispute`, () => {
        const stakes = [
          {
            payout: [10000, 0],
            isInvalid: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 689..711

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

    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

      test(`yes/no  market with invalid disputes`, () => {
        const stakes = [
          {
            payout: [5000, 5000],
            isInvalid: true,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 713..739

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

    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

      const marketCategorical = {
        maxPrice: 100,
        minPrice: 0,
        numTicks: 10003,
        numOutcomes: 7,
    src/modules/reports/selectors/select-migrated-totals.test.js on lines 26..42

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 135.

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

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

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

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

    Refactorings

    Further Reading

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

      const marketBinary = {
        maxPrice: 100,
        minPrice: 0,
        numTicks: 10000,
        numOutcomes: 2,
    src/modules/reports/selectors/select-migrated-totals.test.js on lines 13..24

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

    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

      test(`category market with NO disputes`, () => {
        const actual = selectDisputeOutcomes(marketCategorical, []);
        const expected = marketCategorical.reportableOutcomes;
        expect(actual).toEqual(expected);
      });
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 741..745
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 753..757

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

    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

      test(`scalar market with NO disputes`, () => {
        const actual = selectDisputeOutcomes(marketScalar, []);
        const expected = marketScalar.reportableOutcomes;
        expect(actual).toEqual(expected);
      });
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 741..745
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 747..751

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

    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

      test(`yes/no  market with NO disputes`, () => {
        const actual = selectDisputeOutcomes(marketBinary, []);
        const expected = marketBinary.reportableOutcomes;
        expect(actual).toEqual(expected);
      });
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 747..751
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 753..757

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

    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

      const marketScalar = {
        maxPrice: 100,
        minPrice: 0,
        numTicks: 10000,
        tickSize: 4,
    src/modules/reports/selectors/select-migrated-totals.test.js on lines 44..52

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

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

          {
            payout: [6000, 4000],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 139..150
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 151..162
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 163..174
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 175..186
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 199..210
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 256..267
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 268..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 55.

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

          {
            payout: [2000, 8000],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 139..150
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 151..162
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 175..186
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 187..198
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 199..210
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 256..267
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 268..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 55.

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

          {
            payout: [1500, 8500],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 139..150
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 151..162
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 163..174
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 175..186
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 187..198
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 199..210
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 256..267

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

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

          {
            payout: [1000, 9000],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 151..162
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 163..174
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 175..186
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 187..198
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 199..210
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 256..267
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 268..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 55.

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

          {
            payout: [0, 10000],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 139..150
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 151..162
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 163..174
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 175..186
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 187..198
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 199..210
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 268..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 55.

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

          {
            payout: [4000, 6000],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 139..150
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 151..162
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 163..174
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 187..198
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 199..210
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 256..267
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 268..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 55.

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

          {
            payout: [7000, 3000],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 139..150
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 151..162
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 163..174
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 175..186
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 187..198
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 256..267
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 268..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 55.

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

          {
            payout: [3000, 7000],
            isInvalid: false,
            malformed: false,
            potentialFork: false,
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 139..150
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 163..174
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 175..186
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 187..198
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 199..210
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 256..267
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 268..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 55.

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

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

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

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

    Refactorings

    Further Reading

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

          {
            payout: [9000, 1000],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 5 other locations - About 45 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 317..327
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 328..338
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 339..349
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 410..420
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 447..457

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

          {
            payout: [1000, 9000],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 5 other locations - About 45 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 317..327
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 328..338
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 339..349
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 421..431
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 447..457

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

          {
            payout: [2000, 8000],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: true,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 5 other locations - About 45 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 317..327
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 328..338
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 410..420
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 421..431
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 447..457

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

          {
            payout: [1000, 9000],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 5 other locations - About 45 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 328..338
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 339..349
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 410..420
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 421..431
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 447..457

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

          {
            payout: [3000, 7000],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 5 other locations - About 45 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 317..327
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 339..349
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 410..420
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 421..431
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 447..457

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

          {
            payout: [1500, 8500],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 5 other locations - About 45 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 317..327
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 328..338
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 339..349
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 410..420
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 421..431

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

          {
            payout: [9000, 1000],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 3 other locations - About 30 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 211..220
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 246..255
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 280..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 45.

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

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

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

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

    Refactorings

    Further Reading

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

          {
            payout: [10000, 0],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 3 other locations - About 30 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 211..220
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 236..245
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 280..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 45.

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

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

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

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

    Refactorings

    Further Reading

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

          {
            payout: [8500, 1500],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 3 other locations - About 30 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 211..220
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 236..245
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 246..255

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

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

          {
            payout: [8000, 2000],
            isInvalid: false,
            potentialFork: false,
            tentativeWinning: false,
    Severity: Major
    Found in src/modules/reports/selectors/select-dispute-outcomes.test.js and 3 other locations - About 30 mins to fix
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 236..245
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 246..255
    src/modules/reports/selectors/select-dispute-outcomes.test.js on lines 280..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 45.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status