AugurProject/augur-ui

View on GitHub
integration/reporting/reporting.test.ts

Summary

Maintainability
F
1 wk
Test Coverage

File reporting.test.ts has 460 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";

import "jest-environment-puppeteer";
import Flash from "../helpers/flash";
import { IFlash, IMarket } from "../types/types";
Severity: Minor
Found in integration/reporting/reporting.test.ts - About 7 hrs to fix

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

      beforeEach(async () => {
        await page.evaluate(
          account => window.integrationHelpers.updateAccountAddress(account),
          UnlockedAccounts.CONTRACT_OWNER
        );
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 1 other location - About 6 hrs to fix
    integration/reporting/reporting.test.ts on lines 481..499

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

    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

      beforeEach(async () => {
        await page.evaluate(
          account => window.integrationHelpers.updateAccountAddress(account),
          UnlockedAccounts.CONTRACT_OWNER
        );
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 1 other location - About 6 hrs to fix
    integration/reporting/reporting.test.ts on lines 312..330

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

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

      it("report on outcome_2", async () => {
        await expect(page).toClick("button", {
          text: "outcome_2",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on outcome_1", async () => {
        await expect(page).toClick("button", {
          text: "outcome_1",
          timeout: 10000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on outcome_3", async () => {
        await expect(page).toClick("button", {
          text: "outcome_3",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on outcome_1", async () => {
        await expect(page).toClick("button", {
          text: "outcome_1",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on outcome_4", async () => {
        await expect(page).toClick("button", {
          text: "outcome_4",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on Invalid", async () => {
        await expect(page).toClick("button", {
          text: "Market is invalid",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217

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

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

      it("report on Invalid", async () => {
        await expect(page).toClick("button", {
          text: "Market is invalid",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on outcome_2", async () => {
        await expect(page).toClick("button", {
          text: "outcome_2",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on outcome_3", async () => {
        await expect(page).toClick("button", {
          text: "outcome_3",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 92..106
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

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

      it("report on outcome_4", async () => {
        await expect(page).toClick("button", {
          text: "outcome_4",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 9 other locations - About 3 hrs to fix
    integration/reporting/reporting.test.ts on lines 44..58
    integration/reporting/reporting.test.ts on lines 60..74
    integration/reporting/reporting.test.ts on lines 76..90
    integration/reporting/reporting.test.ts on lines 108..122
    integration/reporting/reporting.test.ts on lines 155..169
    integration/reporting/reporting.test.ts on lines 171..185
    integration/reporting/reporting.test.ts on lines 187..201
    integration/reporting/reporting.test.ts on lines 203..217
    integration/reporting/reporting.test.ts on lines 219..233

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

    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

      beforeEach(async () => {
        await toReporting();
    
        const market: IMarket = await createYesNoMarket();
    
    
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 1 other location - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 387..397

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

    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

      beforeEach(async () => {
        await toReporting();
    
        const market: IMarket = await createScalarMarket();
    
    
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 1 other location - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 245..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 93.

    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

      it("report on No", async () => {
        await expect(page).toClick("button", {
          text: "No",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 257..270
    integration/reporting/reporting.test.ts on lines 272..285
    integration/reporting/reporting.test.ts on lines 287..300
    integration/reporting/reporting.test.ts on lines 332..345
    integration/reporting/reporting.test.ts on lines 362..375
    integration/reporting/reporting.test.ts on lines 456..469
    integration/reporting/reporting.test.ts on lines 556..569

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

    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

      it("report on Invalid", async () => {
        await expect(page).toClick("button", {
          text: "Market is invalid",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 257..270
    integration/reporting/reporting.test.ts on lines 272..285
    integration/reporting/reporting.test.ts on lines 287..300
    integration/reporting/reporting.test.ts on lines 332..345
    integration/reporting/reporting.test.ts on lines 347..360
    integration/reporting/reporting.test.ts on lines 362..375
    integration/reporting/reporting.test.ts on lines 556..569

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

    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

      it("report on yes", async () => {
        await expect(page).toClick("button", {
          text: "Yes",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 272..285
    integration/reporting/reporting.test.ts on lines 287..300
    integration/reporting/reporting.test.ts on lines 332..345
    integration/reporting/reporting.test.ts on lines 347..360
    integration/reporting/reporting.test.ts on lines 362..375
    integration/reporting/reporting.test.ts on lines 456..469
    integration/reporting/reporting.test.ts on lines 556..569

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

    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

      it("report on Invalid", async () => {
        await expect(page).toClick("button", {
          text: "Market is invalid",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 257..270
    integration/reporting/reporting.test.ts on lines 272..285
    integration/reporting/reporting.test.ts on lines 287..300
    integration/reporting/reporting.test.ts on lines 332..345
    integration/reporting/reporting.test.ts on lines 347..360
    integration/reporting/reporting.test.ts on lines 362..375
    integration/reporting/reporting.test.ts on lines 456..469

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

    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

      it("report on Invalid", async () => {
        await expect(page).toClick("button", {
          text: "Market is invalid",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 257..270
    integration/reporting/reporting.test.ts on lines 272..285
    integration/reporting/reporting.test.ts on lines 287..300
    integration/reporting/reporting.test.ts on lines 332..345
    integration/reporting/reporting.test.ts on lines 347..360
    integration/reporting/reporting.test.ts on lines 456..469
    integration/reporting/reporting.test.ts on lines 556..569

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

    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

      it("report on Invalid", async () => {
        await expect(page).toClick("button", {
          text: "Market is invalid",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 257..270
    integration/reporting/reporting.test.ts on lines 272..285
    integration/reporting/reporting.test.ts on lines 332..345
    integration/reporting/reporting.test.ts on lines 347..360
    integration/reporting/reporting.test.ts on lines 362..375
    integration/reporting/reporting.test.ts on lines 456..469
    integration/reporting/reporting.test.ts on lines 556..569

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

    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

      it("report on yes", async () => {
        await expect(page).toClick("button", {
          text: "Yes",
          timeout: 10000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 257..270
    integration/reporting/reporting.test.ts on lines 272..285
    integration/reporting/reporting.test.ts on lines 287..300
    integration/reporting/reporting.test.ts on lines 347..360
    integration/reporting/reporting.test.ts on lines 362..375
    integration/reporting/reporting.test.ts on lines 456..469
    integration/reporting/reporting.test.ts on lines 556..569

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

    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

      it("report on No", async () => {
        await expect(page).toClick("button", {
          text: "No",
          timeout: 1000
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 7 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 257..270
    integration/reporting/reporting.test.ts on lines 287..300
    integration/reporting/reporting.test.ts on lines 332..345
    integration/reporting/reporting.test.ts on lines 347..360
    integration/reporting/reporting.test.ts on lines 362..375
    integration/reporting/reporting.test.ts on lines 456..469
    integration/reporting/reporting.test.ts on lines 556..569

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

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

      it("report on 0", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "0");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 534..543
    integration/reporting/reporting.test.ts on lines 545..554

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

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

      it("report on 5.01", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "5.01");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 534..543
    integration/reporting/reporting.test.ts on lines 545..554

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

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

      it("report on 10", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "10");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 534..543
    integration/reporting/reporting.test.ts on lines 545..554

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

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

      it("report on 5.01", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "5.01");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 545..554

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

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

      it("report on -5.01", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "-5.01");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 534..543

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

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

      it("report on -10", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "-10");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 534..543
    integration/reporting/reporting.test.ts on lines 545..554

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

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

      it("report on -10", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "-10");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 534..543
    integration/reporting/reporting.test.ts on lines 545..554

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

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

      it("report on 0", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "0");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 445..454
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 534..543
    integration/reporting/reporting.test.ts on lines 545..554

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

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

      it("report on -5.01", async () => {
        await expect(page).toFill("#sr__input--outcome-scalar", "-5.01");
        await expect(page).toClick("button", {
          text: "Review"
        });
    Severity: Major
    Found in integration/reporting/reporting.test.ts and 8 other locations - About 2 hrs to fix
    integration/reporting/reporting.test.ts on lines 412..421
    integration/reporting/reporting.test.ts on lines 423..432
    integration/reporting/reporting.test.ts on lines 434..443
    integration/reporting/reporting.test.ts on lines 501..510
    integration/reporting/reporting.test.ts on lines 512..521
    integration/reporting/reporting.test.ts on lines 523..532
    integration/reporting/reporting.test.ts on lines 534..543
    integration/reporting/reporting.test.ts on lines 545..554

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

    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