AugurProject/augur-ui

View on GitHub
src/assertions/market.js

Summary

Maintainability
F
1 wk
Test Coverage

Function default has 355 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function(market) {
  // market can be undefined
  if (!market.id) {
    return;
  }
Severity: Major
Found in src/assertions/market.js - About 1 day to fix

    File market.js has 360 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import assertFormattedNumber from "src/assertions/common/formatted-number";
    import assertFormattedDate from "src/assertions/common/formatted-date";
    import assertReportableOutcomes from "src/assertions/reportable-outcomes";
    
    export default function(market) {
    Severity: Minor
    Found in src/assertions/market.js - About 4 hrs to fix

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

                test(`market.outcomes[${i}].userOpenOrders[${j}].avgPrice`, () => {
                  expect(openOrder.avgPrice).toBeDefined();
                  expect(typeof openOrder.avgPrice).toBe("object");
                  assertFormattedNumber(openOrder.avgPrice, "openOrder.avgPrice");
                });
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 2 hrs to fix
      src/assertions/market.js on lines 243..250

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

      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(`market.outcomes[${i}].userOpenOrders[${j}].unmatchedShares`, () => {
                  expect(openOrder.unmatchedShares).toBeDefined();
                  expect(typeof openOrder.unmatchedShares).toBe("object");
                  assertFormattedNumber(
                    openOrder.unmatchedShares,
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 2 hrs to fix
      src/assertions/market.js on lines 237..241

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

      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(`market.tradeSummary.tradeOrders${i}.ether`, () => {
              expect(trade.ether).toBeDefined();
              expect(typeof trade.ether).toBe("object");
              assertFormattedNumber(trade.ether, "trade.ether");
            });
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 1 hr to fix
      src/assertions/market.js on lines 298..302

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

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

            test(`market.tradeSummary.tradeOrders${i}.shares`, () => {
              expect(trade.shares).toBeDefined();
              expect(typeof trade.shares).toBe("object");
              assertFormattedNumber(trade.shares, "trade.shares");
            });
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 1 hr to fix
      src/assertions/market.js on lines 309..313

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 73.

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

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

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

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

      Refactorings

      Further Reading

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

            test(`market.tradeSummary.tradeOrders${i}.gas.value`, () => {
              expect(trade.gas.value).toBeDefined();
              expect(typeof trade.gas.value).toBe("number");
            });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 329..332
      src/assertions/market.js on lines 334..337
      src/assertions/market.js on lines 344..347

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 69.

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

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

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

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

      Refactorings

      Further Reading

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

            test(`market.tradeSummary.tradeOrders${i}.data.outcomeId`, () => {
              expect(trade.data.outcomeId).toBeDefined();
              expect(typeof trade.data.outcomeId).toBe("string");
            });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 319..322
      src/assertions/market.js on lines 329..332
      src/assertions/market.js on lines 344..347

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 69.

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

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

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

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

      Refactorings

      Further Reading

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

            test(`market.tradeSummary.tradeOrders${i}.data.marketId`, () => {
              expect(trade.data.marketId).toBeDefined();
              expect(typeof trade.data.marketId).toBe("string");
            });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 319..322
      src/assertions/market.js on lines 334..337
      src/assertions/market.js on lines 344..347

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 69.

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

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

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

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

      Refactorings

      Further Reading

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

            test(`market.tradeSummary.tradeOrders${i}.data.outcomeName`, () => {
              expect(trade.data.outcomeName).toBeDefined();
              expect(typeof trade.data.outcomeName).toBe("string");
            });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 319..322
      src/assertions/market.js on lines 329..332
      src/assertions/market.js on lines 334..337

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 69.

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

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

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

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

      Refactorings

      Further Reading

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

              test(`market.outcomes[${i}].orderBook.asks`, () => {
                expect(orderBook.asks).toBeDefined();
                expect(Array.isArray(orderBook.asks)).toBe(true);
              });
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 1 hr to fix
      src/assertions/market.js on lines 180..183

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 67.

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

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

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

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

      Refactorings

      Further Reading

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

              test(`market.outcomes[${i}].orderBook.bids`, () => {
                expect(orderBook.bids).toBeDefined();
                expect(Array.isArray(orderBook.bids)).toBe(true);
              });
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 1 hr to fix
      src/assertions/market.js on lines 185..188

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 67.

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

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

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

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

      Refactorings

      Further Reading

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

                test(`market.outcomes[${i}].userOpenOrders[${j}].marketId`, () => {
                  expect(openOrder.marketId).toBeDefined();
                  expect(typeof openOrder.marketId).toBe("string");
                });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 217..220
      src/assertions/market.js on lines 227..230
      src/assertions/market.js on lines 232..235

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

      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

                test(`market.outcomes[${i}].userOpenOrders[${j}].type`, () => {
                  expect(openOrder.type).toBeDefined();
                  expect(typeof openOrder.type).toBe("string");
                });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 217..220
      src/assertions/market.js on lines 222..225
      src/assertions/market.js on lines 227..230

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

      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

                test(`market.outcomes[${i}].userOpenOrders[${j}].id`, () => {
                  expect(openOrder.id).toBeDefined();
                  expect(typeof openOrder.id).toBe("object");
                });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 222..225
      src/assertions/market.js on lines 227..230
      src/assertions/market.js on lines 232..235

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

      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

                test(`market.outcomes[${i}].userOpenOrders[${j}].outcomeName`, () => {
                  expect(openOrder.outcomeName).toBeDefined();
                  expect(typeof openOrder.outcomeName).toBe("string");
                });
      Severity: Major
      Found in src/assertions/market.js and 3 other locations - About 1 hr to fix
      src/assertions/market.js on lines 217..220
      src/assertions/market.js on lines 222..225
      src/assertions/market.js on lines 232..235

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

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

              test(`market.outcomes[${i}].id`, () => {
                expect(outcome.id).toBeDefined();
                expect(typeof outcome.id).toBe("string");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.outcomes[${i}].trade.maxNumShares`, () => {
                expect(trade.maxNumShares).toBeDefined();
                expect(typeof trade.maxNumShares).toBe("number");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.outcomes[${i}].trade.updateTradeOrder`, () => {
                expect(trade.updateTradeOrder).toBeDefined();
                expect(typeof trade.updateTradeOrder).toBe("function");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.tags[${i}].onCLick`, () => {
                expect(tag.onClick).toBeDefined();
                expect(typeof tag.onClick).toBe("function");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.outcomes[${i}].marketId`, () => {
                expect(outcome.marketId).toBeDefined();
                expect(typeof outcome.marketId).toBe("string");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

            test(`market.tradeSummary.tradeOrders${i}.description`, () => {
              expect(trade.description).toBeDefined();
              expect(typeof trade.description).toBe("string");
            });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327

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

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

              test(`market.outcomes[${i}].name`, () => {
                expect(outcome.name).toBeDefined();
                expect(typeof outcome.name).toBe("string");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.outcomes[${i}].trade.limitPrice`, () => {
                expect(trade.limitPrice).toBeDefined();
                expect(typeof trade.limitPrice).toBe("number");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.tags[${i}].name`, () => {
                expect(tag.name).toBeDefined();
                expect(typeof tag.name).toBe("string");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.outcomes[${i}].trade.numShares`, () => {
                expect(trade.numShares).toBeDefined();
                expect(typeof trade.numShares).toBe("number");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

            test(`market.tradeSummary.tradeOrders${i}.limitPrice`, () => {
              expect(trade.limitPrice).toBeDefined();
              expect(typeof trade.limitPrice).toBe("number");
            });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

            test(`market.tradeSummary.tradeOrders${i}.gas`, () => {
              expect(trade.gas).toBeDefined();
              expect(typeof trade.gas).toBe("object");
            });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

              test(`market.outcomes[${i}].trade.side`, () => {
                expect(trade.side).toBeDefined();
                expect(typeof trade.side).toBe("string");
              });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 324..327
      src/assertions/market.js on lines 339..342

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

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

            test(`market.tradeSummary.tradeOrders${i}.data`, () => {
              expect(trade.data).toBeDefined();
              expect(typeof trade.data).toBe("object");
            });
      Severity: Major
      Found in src/assertions/market.js and 13 other locations - About 1 hr to fix
      src/assertions/market.js on lines 86..89
      src/assertions/market.js on lines 91..94
      src/assertions/market.js on lines 108..111
      src/assertions/market.js on lines 113..116
      src/assertions/market.js on lines 118..121
      src/assertions/market.js on lines 142..145
      src/assertions/market.js on lines 147..150
      src/assertions/market.js on lines 152..155
      src/assertions/market.js on lines 157..160
      src/assertions/market.js on lines 168..171
      src/assertions/market.js on lines 304..307
      src/assertions/market.js on lines 315..318
      src/assertions/market.js on lines 339..342

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

      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

              test(`market.outcomes[${i}].userOpenOrders`, () => {
                expect(userOpenOrders).toBeDefined();
                expect(Array.isArray(userOpenOrders)).toBe(true);
              });
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 1 hr to fix
      src/assertions/market.js on lines 201..204

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 59.

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

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

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

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

      Refactorings

      Further Reading

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

              test(`market.outcomes[${i}].userOpenOrders`, () => {
                expect(userOpenOrders).toBeDefined();
                expect(Array.isArray(userOpenOrders)).toBe(true);
              });
      Severity: Major
      Found in src/assertions/market.js and 1 other location - About 1 hr to fix
      src/assertions/market.js on lines 206..209

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 59.

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

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

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

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

      Refactorings

      Further Reading

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

              test(`market.outcomes[${i}]`, () => {
                expect(outcome).toBeDefined();
                expect(typeof outcome).toBe("object");
              });
      Severity: Minor
      Found in src/assertions/market.js and 1 other location - About 55 mins to fix
      src/assertions/market.js on lines 137..140

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 53.

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

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

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

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

      Refactorings

      Further Reading

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

              test(`market.outcomes[${i}].trade`, () => {
                expect(trade).toBeDefined();
                expect(typeof trade).toBe("object");
              });
      Severity: Minor
      Found in src/assertions/market.js and 1 other location - About 55 mins to fix
      src/assertions/market.js on lines 103..106

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 53.

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

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

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

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

      Refactorings

      Further Reading

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

              test(`market.outcomes[${i}].lastPrice`, () => {
                expect(outcome.lastPrice).toBeDefined();
                assertFormattedNumber(outcome.lastPrice, "outcome.lastPrice");
              });
      Severity: Minor
      Found in src/assertions/market.js and 1 other location - About 50 mins to fix
      src/assertions/market.js on lines 128..134

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

      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(`market.outcomes[${i}].lastPricePercent`, () => {
                expect(outcome.lastPricePercent).toBeDefined();
                assertFormattedNumber(
                  outcome.lastPricePercent,
                  "outcome.lastPricePercent"
      Severity: Minor
      Found in src/assertions/market.js and 1 other location - About 50 mins to fix
      src/assertions/market.js on lines 123..126

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

      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