Showing 2,206 of 2,206 total issues

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

    const { result: resultA } = renderHook(() => useViewTracker(trackingData), {
      wrapper: props =>
        wrapper({ ...props, pageData: fixtureData, atiData: atiAnalytics }),
    });
Severity: Major
Found in src/app/hooks/useViewTracker/index.test.jsx and 6 other locations - About 55 mins to fix
src/app/hooks/useViewTracker/index.test.jsx on lines 207..210
src/app/hooks/useViewTracker/index.test.jsx on lines 257..260
src/app/hooks/useViewTracker/index.test.jsx on lines 293..296
src/app/hooks/useViewTracker/index.test.jsx on lines 326..329
src/app/hooks/useViewTracker/index.test.jsx on lines 362..365
src/app/hooks/useViewTracker/index.test.jsx on lines 462..465

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

    const { result } = renderHook(() => useViewTracker(trackingData), {
      wrapper: props =>
        wrapper({ ...props, pageData: fixtureData, atiData: atiAnalytics }),
    });
Severity: Major
Found in src/app/hooks/useViewTracker/index.test.jsx and 6 other locations - About 55 mins to fix
src/app/hooks/useViewTracker/index.test.jsx on lines 257..260
src/app/hooks/useViewTracker/index.test.jsx on lines 293..296
src/app/hooks/useViewTracker/index.test.jsx on lines 322..325
src/app/hooks/useViewTracker/index.test.jsx on lines 326..329
src/app/hooks/useViewTracker/index.test.jsx on lines 362..365
src/app/hooks/useViewTracker/index.test.jsx on lines 462..465

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

    const { result } = renderHook(() => useViewTracker(trackingData), {
      wrapper: props =>
        wrapper({ ...props, pageData: fixtureData, atiData: atiAnalytics }),
    });
Severity: Major
Found in src/app/hooks/useViewTracker/index.test.jsx and 6 other locations - About 55 mins to fix
src/app/hooks/useViewTracker/index.test.jsx on lines 207..210
src/app/hooks/useViewTracker/index.test.jsx on lines 257..260
src/app/hooks/useViewTracker/index.test.jsx on lines 322..325
src/app/hooks/useViewTracker/index.test.jsx on lines 326..329
src/app/hooks/useViewTracker/index.test.jsx on lines 362..365
src/app/hooks/useViewTracker/index.test.jsx on lines 462..465

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

    const { result } = renderHook(() => useViewTracker(trackingData), {
      wrapper: props =>
        wrapper({ ...props, pageData: fixtureData, atiData: atiAnalytics }),
    });
Severity: Major
Found in src/app/hooks/useViewTracker/index.test.jsx and 6 other locations - About 55 mins to fix
src/app/hooks/useViewTracker/index.test.jsx on lines 207..210
src/app/hooks/useViewTracker/index.test.jsx on lines 257..260
src/app/hooks/useViewTracker/index.test.jsx on lines 293..296
src/app/hooks/useViewTracker/index.test.jsx on lines 322..325
src/app/hooks/useViewTracker/index.test.jsx on lines 326..329
src/app/hooks/useViewTracker/index.test.jsx on lines 362..365

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

    const { result } = renderHook(() => useViewTracker(trackingData), {
      wrapper: props =>
        wrapper({ ...props, pageData: fixtureData, atiData: atiAnalytics }),
    });
Severity: Major
Found in src/app/hooks/useViewTracker/index.test.jsx and 6 other locations - About 55 mins to fix
src/app/hooks/useViewTracker/index.test.jsx on lines 207..210
src/app/hooks/useViewTracker/index.test.jsx on lines 293..296
src/app/hooks/useViewTracker/index.test.jsx on lines 322..325
src/app/hooks/useViewTracker/index.test.jsx on lines 326..329
src/app/hooks/useViewTracker/index.test.jsx on lines 362..365
src/app/hooks/useViewTracker/index.test.jsx on lines 462..465

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

    const { result } = renderHook(() => useViewTracker(trackingData), {
      wrapper: props =>
        wrapper({ ...props, pageData: fixtureData, atiData: atiAnalytics }),
    });
Severity: Major
Found in src/app/hooks/useViewTracker/index.test.jsx and 6 other locations - About 55 mins to fix
src/app/hooks/useViewTracker/index.test.jsx on lines 207..210
src/app/hooks/useViewTracker/index.test.jsx on lines 257..260
src/app/hooks/useViewTracker/index.test.jsx on lines 293..296
src/app/hooks/useViewTracker/index.test.jsx on lines 322..325
src/app/hooks/useViewTracker/index.test.jsx on lines 326..329
src/app/hooks/useViewTracker/index.test.jsx on lines 462..465

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

  it('should add override query to full url', () => {
    const url = 'https://domain.com/path-name';
    const expected = 'https://domain.com/path-name?renderer_env=live';

    const actual = addOverrideQuery(url);
Severity: Major
Found in src/app/routes/utils/overrideRendererOnTest/index.test.js and 3 other locations - About 55 mins to fix
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 18..24
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 26..33
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 44..50

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

  it('includes chunk url as href attribute', () => {
    const attributes = getLinkAttributes(chunk);

    expect(attributes).toEqual(
      expect.objectContaining({
Severity: Minor
Found in src/server/utilities/attributeFunctions/index.test.js and 1 other location - About 55 mins to fix
src/server/utilities/attributeFunctions/index.test.js on lines 15..21

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

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

export const isValidDateTime = dateTime => {
  // eslint-disable-next-line no-restricted-globals
  if (isNaN(dateTime) || dateTime === null) {
    return false;
  }
Severity: Minor
Found in src/app/legacy/containers/ArticleTimestamp/helpers.js and 1 other location - About 55 mins to fix
src/app/legacy/psammead/psammead-timestamp-container/src/utilities/index.js on lines 32..38

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

  it('should not render when cpsRecommendations toggle is disabled', () => {
    const toggleEnabled = false;

    const { container } = renderContainer(
      ltrRecommendationsData,
Severity: Minor
Found in src/app/legacy/containers/CpsRecommendations/index.test.jsx and 1 other location - About 55 mins to fix
src/app/legacy/containers/CpsRecommendations/index.test.jsx on lines 61..70

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

describe("Image - imported as '{ Img }'", () => {
  const props = {
    ...landscape,
    width: null,
  };
Severity: Minor
Found in src/app/legacy/psammead/psammead-image/src/index.test.jsx and 1 other location - About 55 mins to fix
src/app/legacy/psammead/psammead-image/src/index.test.jsx on lines 7..17

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

  it('should add override query to pathname url with query string', () => {
    const url = 'path-name?app_env=live';
    const expected = 'path-name?app_env=live&renderer_env=live';

    const actual = addOverrideQuery(url);
Severity: Major
Found in src/app/routes/utils/overrideRendererOnTest/index.test.js and 3 other locations - About 55 mins to fix
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 10..16
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 18..24
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 26..33

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

      it('should have the correct articles metadata', () => {
        cy.get('meta[name="article:author"]').should(
          'have.attr',
          'content',
          appConfig[config[service].name][variant].articleAuthor,
Severity: Minor
Found in cypress/e2e/pages/articles/tests.js and 1 other location - About 55 mins to fix
cypress/e2e/pages/errorPage404/tests.js on lines 96..102

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

        it('should have lang attribute', () => {
          cy.get('html').should(
            'have.attr',
            'lang',
            appConfig[config[service].name][variant].lang,
Severity: Minor
Found in cypress/e2e/pages/errorPage404/tests.js and 1 other location - About 55 mins to fix
cypress/e2e/pages/articles/tests.js on lines 31..37

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

  it('should return id of promo-link with contentType and URI if contentType exists for a "Features and Analysis" promo', () => {
    expect(
      buildUniquePromoId({
        sectionType: 'features-and-analysis',
        promoGroupId: labelId,
Severity: Minor
Found in src/app/legacy/containers/StoryPromo/utilities/index.test.js and 1 other location - About 55 mins to fix
src/app/legacy/containers/StoryPromo/utilities/index.test.js on lines 131..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 4 locations. Consider refactoring.
Open

  it('should add override query to pathname url', () => {
    const url = 'path-name';
    const expected = 'path-name?renderer_env=live';

    const actual = addOverrideQuery(url);
Severity: Major
Found in src/app/routes/utils/overrideRendererOnTest/index.test.js and 3 other locations - About 55 mins to fix
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 10..16
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 26..33
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 44..50

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

  it('should add override query to full url with query string', () => {
    const url = 'https://domain.com/path-name?app_env=live';
    const expected =
      'https://domain.com/path-name?app_env=live&renderer_env=live';

Severity: Major
Found in src/app/routes/utils/overrideRendererOnTest/index.test.js and 3 other locations - About 55 mins to fix
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 10..16
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 18..24
src/app/routes/utils/overrideRendererOnTest/index.test.js on lines 44..50

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

describe("Image - imported as default 'Image'", () => {
  const props = {
    ...landscape,
    width: null,
  };
Severity: Minor
Found in src/app/legacy/psammead/psammead-image/src/index.test.jsx and 1 other location - About 55 mins to fix
src/app/legacy/psammead/psammead-image/src/index.test.jsx on lines 19..29

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

  it('should render article page when "Key/Summary Points" tagging is not set', () => {
    const result = shouldRender(
      articleDataWithoutKeySummaryPointsTagging,
      service,
      pathname,
src/app/legacy/containers/PageHandlers/withData/shouldRender/index.test.js on lines 298..310

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

  it('includes crossOrigin attribute', () => {
    const attributes = getLinkAttributes(chunk);

    expect(attributes).toEqual(
      expect.objectContaining({ crossOrigin: 'anonymous' }),
Severity: Minor
Found in src/server/utilities/attributeFunctions/index.test.js and 1 other location - About 55 mins to fix
src/server/utilities/attributeFunctions/index.test.js on lines 23..31

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

Severity
Category
Status
Source
Language