KarrLab/datanator_frontend

View on GitHub
src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js

Summary

Maintainability
F
5 days
Test Coverage

File Reaction.test.js has 389 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { RateConstantsDataTable } from "~/scenes/BiochemicalEntityDetails/Reaction/RateConstantsDataTable";
import testRawData from "~/__tests__/fixtures/reaction-constants-adenylate-kinase";
import { MetadataSection } from "~/scenes/BiochemicalEntityDetails/Reaction/MetadataSection";
import { shallow } from "enzyme";
import { getListDomElements, getSectionFromList } from "~/utils/testing_utils";
Severity: Minor
Found in src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js - About 5 hrs to fix

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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 81 },
              ki: {},
              km: {
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 38..52
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 53..67
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 68..82
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 134..148
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 149..163
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 164..178

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 38 },
              ki: {},
              km: {
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 38..52
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 53..67
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 68..82
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 83..97
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 134..148
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 149..163

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 680 },
              ki: {},
              km: {
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 38..52
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 68..82
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 83..97
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 134..148
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 149..163
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 164..178

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 8.3 },
              ki: {},
              km: {
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 38..52
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 53..67
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 68..82
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 83..97
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 134..148
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 164..178

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 650 },
              ki: {},
              km: {
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 53..67
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 68..82
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 83..97
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 134..148
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 149..163
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 164..178

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 650 },
              ki: {},
              km: {
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 38..52
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 53..67
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 68..82
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 83..97
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 149..163
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 164..178

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

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

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

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

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

    Refactorings

    Further Reading

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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 595 },
              ki: {},
              km: {
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 38..52
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 53..67
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 83..97
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 134..148
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 149..163
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 164..178

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

    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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 22 },
              ki: {},
              km: { AMP: { units: "M", value: 0.0018 } },
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 98..109
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 110..121

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

    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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 6 },
              ki: {},
              km: { AMP: { units: "M", value: 0.0014 } },
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 98..109
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 122..133

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

    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

            {
              enzyme: { name: "adenylate kinase", subunits: ["P05081"] },
              kcat: { units: "s^(-1)", value: 500 },
              ki: {},
              km: { AMP: { units: "M", value: 0.00015 } },
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 110..121
    src/__tests__/scenes/BiochemicalEntityDetails/Reaction.test.js on lines 122..133

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

    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