department-of-veterans-affairs/vets-website

View on GitHub
src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js

Summary

Maintainability
D
2 days
Test Coverage

File RequestedAppointmentDetailsPage.unit.spec.js has 387 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { mockFetch } from '@department-of-veterans-affairs/platform-testing/helpers';
import { fireEvent, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

import { expect } from 'chai';

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

        mockAppointmentsApi({
          end: moment()
            .add(2, 'day')
            .format('YYYY-MM-DD'),
          start: moment()
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 285..294

    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

          mockAppointmentsApi({
            end: moment()
              .add(1, 'day')
              .format('YYYY-MM-DD'),
            start: moment()
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 51..60

    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

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

          mockAppointmentsApi({
            start: moment()
              .subtract(120, 'days')
              .format('YYYY-MM-DD'),
            end: moment()
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 359..368

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

    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

          mockAppointmentsApi({
            start: moment()
              .subtract(120, 'days')
              .format('YYYY-MM-DD'),
            end: moment()
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 431..440

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

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

          await waitFor(() => {
            expect(store.getState().appointments.showCancelModal).to.equal(true);
          });
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 208..210
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 249..251
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 317..319
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 462..464

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

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

          await waitFor(() => {
            expect(store.getState().appointments.showCancelModal).to.equal(true);
          });
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 208..210
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 249..251
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 317..319
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 387..389

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

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

        await waitFor(() => {
          expect(store.getState().appointments.showCancelModal).to.equal(true);
        });
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 249..251
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 317..319
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 387..389
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 462..464

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

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

        await waitFor(() => {
          expect(store.getState().appointments.showCancelModal).to.equal(true);
        });
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 208..210
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 317..319
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 387..389
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 462..464

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

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

          await waitFor(() => {
            expect(store.getState().appointments.showCancelModal).to.equal(true);
          });
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 208..210
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 249..251
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 387..389
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 462..464

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

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

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

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

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

    Refactorings

    Further Reading

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

        const screen = renderWithStoreAndRouter(<AppointmentList />, {
          store,
          path: `/pending/${response.id}`,
        });
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 85..88
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 144..147
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 87..90
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 238..241
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 301..304
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 375..378
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 450..453

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

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

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

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

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

    Refactorings

    Further Reading

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

          const screen = renderWithStoreAndRouter(<AppointmentList />, {
            store,
            path: `/pending/${response.id}`,
          });
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 85..88
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 144..147
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 87..90
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 196..199
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 238..241
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 375..378
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 450..453

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

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

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

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

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

    Refactorings

    Further Reading

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

        const screen = renderWithStoreAndRouter(<AppointmentList />, {
          store,
          path: `/pending/${response.id}`,
        });
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 85..88
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 144..147
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 87..90
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 196..199
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 301..304
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 375..378
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 450..453

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

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

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

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

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

    Refactorings

    Further Reading

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

          const screen = renderWithStoreAndRouter(<AppointmentList />, {
            store,
            path: `/pending/${response.id}`,
          });
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 85..88
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 144..147
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 87..90
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 196..199
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 238..241
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 301..304
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 375..378

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

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

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

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

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

    Refactorings

    Further Reading

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

        const screen = renderWithStoreAndRouter(<AppointmentList />, {
          initialState,
          path: `/pending/${response.id}`,
        });
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 85..88
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 144..147
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 196..199
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 238..241
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 301..304
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 375..378
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 450..453

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

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

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

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

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

    Refactorings

    Further Reading

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

          const screen = renderWithStoreAndRouter(<AppointmentList />, {
            store,
            path: `/pending/${response.id}`,
          });
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 85..88
    src/applications/vaos/appointment-list/components/ConfirmedAppointmentDetailsPage/index.unit.spec.js on lines 144..147
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 87..90
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 196..199
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 238..241
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 301..304
    src/applications/vaos/appointment-list/components/RequestedAppointmentDetailsPage.unit.spec.js on lines 450..453

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

    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