InsidersByte/honeymoon-gift-list

View on GitHub

Showing 276 of 276 total issues

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

exports.up = knex =>
  knex.schema.createTable('wedding_party_members', table => {
    table.increments();
    table.timestamps();
    table.string('name').notNullable();
Severity: Major
Found in migrations/20160930122356_wedding_party_members.js and 1 other location - About 6 hrs to fix
migrations/20160930122947_gifts.js on lines 1..11

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

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

  router.route('/:id/paid').put(
    secure,
    wrap(function* markAsPaid(req, res) {
      const { id } = req.params;

Severity: Major
Found in server/routes/api/giftSet.js and 1 other location - About 6 hrs to fix
server/routes/api/giftSet.js on lines 138..155

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

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

  router.route('/:id/detailsSent').put(
    secure,
    wrap(function* markAsDetailsSent(req, res) {
      const { id } = req.params;

Severity: Major
Found in server/routes/api/giftSet.js and 1 other location - About 6 hrs to fix
server/routes/api/giftSet.js on lines 119..136

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

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

File react-router_vx.x.x.js has 423 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// flow-typed signature: 72830a835b9932d7c49d8653e0c7730c
// flow-typed version: <<STUB>>/react-router_v3.0.2/flow_v0.43.0

/**
 * This is an autogenerated libdef stub for:
Severity: Minor
Found in flow-typed/npm/react-router_vx.x.x.js - About 6 hrs to fix

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

      describe('getInvitedUsers', () => {
        it('should call and return users.getInvitedUsers', () => {
          const state = { users: { users: [{ id: 1 }] } };
          const users = [{ id: 1 }];
    
    
    Severity: Major
    Found in public/redux/index.test.js and 1 other location - About 5 hrs to fix
    public/redux/index.test.js on lines 57..71

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

    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('getActiveUsers', () => {
        it('should call and return users.getActiveUsers', () => {
          const state = { users: { users: [{ id: 1 }] } };
          const users = [{ id: 1 }];
    
    
    Severity: Major
    Found in public/redux/index.test.js and 1 other location - About 5 hrs to fix
    public/redux/index.test.js on lines 73..87

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

    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

    File eslint-plugin-react_vx.x.x.js has 411 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // flow-typed signature: 6e25832b7265b2e13595a127c814e8a0
    // flow-typed version: <<STUB>>/eslint-plugin-react_v6.10.3/flow_v0.43.0
    
    /**
     * This is an autogenerated libdef stub for:
    Severity: Minor
    Found in flow-typed/npm/eslint-plugin-react_vx.x.x.js - About 5 hrs to fix

      File validator_vx.x.x.js has 405 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // flow-typed signature: 0c457f595458ff861128bd5a2f07a787
      // flow-typed version: <<STUB>>/validator_v7.0.0/flow_v0.43.0
      
      /**
       * This is an autogenerated libdef stub for:
      Severity: Minor
      Found in flow-typed/npm/validator_vx.x.x.js - About 5 hrs to fix

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

          describe('getIsLoading', () => {
            it('should call and return users.getIsLoading', () => {
              const state = { users: { users: [{ id: 1 }] } };
        
              getIsLoading.mockReturnValueOnce(true);
        Severity: Major
        Found in public/redux/index.test.js and 3 other locations - About 5 hrs to fix
        public/redux/index.test.js on lines 89..102
        public/redux/index.test.js on lines 119..132
        public/redux/index.test.js on lines 134..147

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

        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

          describe('getIsSaving', () => {
            it('should call and return users.getIsSaving', () => {
              const state = { users: { users: [{ id: 1 }] } };
        
              getIsSaving.mockReturnValueOnce(true);
        Severity: Major
        Found in public/redux/index.test.js and 3 other locations - About 5 hrs to fix
        public/redux/index.test.js on lines 89..102
        public/redux/index.test.js on lines 104..117
        public/redux/index.test.js on lines 134..147

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

        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

          describe('getIsModalOpen', () => {
            it('should call and return users.getIsModalOpen', () => {
              const state = { users: { users: [{ id: 1 }] } };
        
              getIsModalOpen.mockReturnValueOnce(true);
        Severity: Major
        Found in public/redux/index.test.js and 3 other locations - About 5 hrs to fix
        public/redux/index.test.js on lines 104..117
        public/redux/index.test.js on lines 119..132
        public/redux/index.test.js on lines 134..147

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

        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

          describe('getIsDeleting', () => {
            it('should call and return users.getIsDeleting', () => {
              const state = { users: { users: [{ id: 1 }] } };
        
              getIsDeleting.mockReturnValueOnce(true);
        Severity: Major
        Found in public/redux/index.test.js and 3 other locations - About 5 hrs to fix
        public/redux/index.test.js on lines 89..102
        public/redux/index.test.js on lines 104..117
        public/redux/index.test.js on lines 119..132

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle LOAD_USERS_REQUEST', () => {
              expect(reducer({ ...initialState, isLoading: false }, { type: 'our-wedding-heroes/users/LOAD_USERS_REQUEST' })).toEqual({
                isLoading: true,
                isSaving: false,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 55..71
        public/redux/users.test.js on lines 73..89
        public/redux/users.test.js on lines 91..107
        public/redux/users.test.js on lines 147..163
        public/redux/users.test.js on lines 165..181
        public/redux/users.test.js on lines 203..219
        public/redux/users.test.js on lines 246..262
        public/redux/users.test.js on lines 264..280

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle CLOSE_USER_MODAL', () => {
              expect(reducer({ ...initialState, isModalOpen: false }, { type: 'our-wedding-heroes/users/CLOSE_USER_MODAL' })).toEqual({
                isLoading: false,
                isSaving: false,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 55..71
        public/redux/users.test.js on lines 91..107
        public/redux/users.test.js on lines 109..125
        public/redux/users.test.js on lines 147..163
        public/redux/users.test.js on lines 165..181
        public/redux/users.test.js on lines 203..219
        public/redux/users.test.js on lines 246..262
        public/redux/users.test.js on lines 264..280

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle DELETE_USER_SUCCESS', () => {
              expect(reducer({ ...initialState, isDeleting: true }, { type: 'our-wedding-heroes/users/DELETE_USER_SUCCESS' })).toEqual({
                isLoading: false,
                isSaving: false,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 55..71
        public/redux/users.test.js on lines 73..89
        public/redux/users.test.js on lines 91..107
        public/redux/users.test.js on lines 109..125
        public/redux/users.test.js on lines 147..163
        public/redux/users.test.js on lines 165..181
        public/redux/users.test.js on lines 203..219
        public/redux/users.test.js on lines 264..280

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle CREATE_USER_ERROR', () => {
              expect(reducer({ ...initialState, isSaving: true }, { type: 'our-wedding-heroes/users/CREATE_USER_ERROR' })).toEqual({
                isLoading: false,
                isSaving: false,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 55..71
        public/redux/users.test.js on lines 73..89
        public/redux/users.test.js on lines 91..107
        public/redux/users.test.js on lines 109..125
        public/redux/users.test.js on lines 147..163
        public/redux/users.test.js on lines 165..181
        public/redux/users.test.js on lines 246..262
        public/redux/users.test.js on lines 264..280

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle CREATE_USER_REQUEST', () => {
              expect(reducer({ ...initialState, isSaving: true }, { type: 'our-wedding-heroes/users/CREATE_USER_REQUEST' })).toEqual({
                isLoading: false,
                isSaving: true,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 55..71
        public/redux/users.test.js on lines 73..89
        public/redux/users.test.js on lines 91..107
        public/redux/users.test.js on lines 109..125
        public/redux/users.test.js on lines 147..163
        public/redux/users.test.js on lines 203..219
        public/redux/users.test.js on lines 246..262
        public/redux/users.test.js on lines 264..280

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle OPEN_USER_MODAL', () => {
              expect(reducer({ ...initialState, isModalOpen: false }, { type: 'our-wedding-heroes/users/OPEN_USER_MODAL' })).toEqual({
                isLoading: false,
                isSaving: false,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 73..89
        public/redux/users.test.js on lines 91..107
        public/redux/users.test.js on lines 109..125
        public/redux/users.test.js on lines 147..163
        public/redux/users.test.js on lines 165..181
        public/redux/users.test.js on lines 203..219
        public/redux/users.test.js on lines 246..262
        public/redux/users.test.js on lines 264..280

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle CLOSE_USER_MODAL', () => {
              expect(reducer({ ...initialState, isModalOpen: false }, { type: 'our-wedding-heroes/users/CLOSE_USER_MODAL' })).toEqual({
                isLoading: false,
                isSaving: false,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 55..71
        public/redux/users.test.js on lines 73..89
        public/redux/users.test.js on lines 109..125
        public/redux/users.test.js on lines 147..163
        public/redux/users.test.js on lines 165..181
        public/redux/users.test.js on lines 203..219
        public/redux/users.test.js on lines 246..262
        public/redux/users.test.js on lines 264..280

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should handle LOAD_USERS_ERROR', () => {
              expect(reducer({ ...initialState, isLoading: true }, { type: 'our-wedding-heroes/users/LOAD_USERS_ERROR' })).toEqual({
                isLoading: false,
                isSaving: false,
                isDeleting: false,
        Severity: Major
        Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
        public/redux/users.test.js on lines 55..71
        public/redux/users.test.js on lines 73..89
        public/redux/users.test.js on lines 91..107
        public/redux/users.test.js on lines 109..125
        public/redux/users.test.js on lines 165..181
        public/redux/users.test.js on lines 203..219
        public/redux/users.test.js on lines 246..262
        public/redux/users.test.js on lines 264..280

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

        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