catarse/catarse.js

View on GitHub

Showing 810 of 1,380 total issues

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

        vnode.state = {
            listVM,
            filterVM,
            filterBuilder,
            submit,
Severity: Major
Found in legacy/src/root/projects-contribution-report.js and 2 other locations - About 1 hr to fix
legacy/src/c/admin-balance-transfer-item-detail.js on lines 77..87
legacy/src/c/project-contributions.js on lines 86..96

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

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

        it('should show generate second slip and cancel buttons for active subscription', function() {
            expect(activeSubscriptionExpiredSlip.contains('Gerar segunda via')).toBeTruthy();
            expect(activeSubscriptionExpiredSlip.contains('Cancelar assinatura')).toBeTruthy();
        });
legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

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

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

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

Refactorings

Further Reading

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

    it('should render the slip iframe if slip payment', () => {
        expect($slip.has('iframe.slip')).toBeTrue();
        expect($cc.has('iframe.slip')).toBeFalse();
    });
Severity: Major
Found in legacy/spec/components/root/thank-you.spec.js and 2 other locations - About 1 hr to fix
legacy/spec/components/admin-transaction.spec.js on lines 21..24
legacy/spec/components/root/projects-payment.spec.js on lines 56..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 57.

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

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

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

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

Refactorings

Further Reading

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

        it('should render details about contribution', () => {
            expect($output.contains('Valor: R$50,00')).toBeTrue();
            expect($output.contains('Meio: MoIP')).toBeTrue();
        });
Severity: Major
Found in legacy/spec/components/admin-transaction.spec.js and 2 other locations - About 1 hr to fix
legacy/spec/components/root/projects-payment.spec.js on lines 56..60
legacy/spec/components/root/thank-you.spec.js on lines 45..48

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

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

        it('should show edit and cancel subscription buttons paid payment', function() {
            expect(activeSubscriptionWithPaidPayment.contains('Editar assinatura')).toBeTruthy();
            expect(activeSubscriptionWithPaidPayment.contains('Cancelar assinatura')).toBeTruthy();
        });
legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

        it('should show print slip and cancel buttons for active subscription', function() {
            expect(activeSubscriptionNotExpiredSlip.contains('Imprimir boleto')).toBeTruthy();
            expect(activeSubscriptionNotExpiredSlip.contains('Cancelar assinatura')).toBeTruthy();
        });        
legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88

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

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

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

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

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

Refactorings

Further Reading

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

        vnode.state = {
            metaBank,
            userBankAccount,
            transitionBankAccount,
            userBalance,
Severity: Major
Found in legacy/src/c/admin-balance-transfer-item-detail.js and 2 other locations - About 1 hr to fix
legacy/src/c/project-contributions.js on lines 86..96
legacy/src/root/projects-contribution-report.js on lines 267..277

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

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

        it('should show print slip and cancel buttons', function() {
            expect(printSecondSlipButton.contains('Imprimir boleto')).toBeTruthy();
            expect(printSecondSlipButton.contains('Cancelar assinatura')).toBeTruthy();
        });
legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

        it('should show redo payment and cancel subscription buttons', function() {
            expect(activeSubscriptionLastPaymentRefused.contains('Refazer pagamento')).toBeTruthy();
            expect(activeSubscriptionLastPaymentRefused.contains('Cancelar assinatura')).toBeTruthy();
        });
legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

        it('should show generate second slip and cancel buttons', function() {
            expect(generateSecondSlipButton.contains('Gerar segunda via')).toBeTruthy();
            expect(generateSecondSlipButton.contains('Cancelar assinatura')).toBeTruthy();
        });
legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

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

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

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

Refactorings

Further Reading

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

    concern: function(description, specDefinitions) {
        var suite = jasmine.grammar.getEnv().describe(description, specDefinitions);
        suite.tags = ['concern'];
        return suite;
    },
Severity: Major
Found in legacy/spec/lib/jasmine-species/jasmine-grammar.js and 2 other locations - About 1 hr to fix
legacy/spec/lib/jasmine-species/jasmine-grammar.js on lines 132..136
legacy/spec/lib/jasmine-species/jasmine-grammar.js on lines 154..158

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

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

    matchers.toBeTrue = function() {
        return this.actual === true || this.actual instanceof Boolean && this.actual.valueOf() === true;
    };
Severity: Major
Found in legacy/spec/lib/jasmine-matchers.js and 1 other location - About 1 hr to fix
legacy/spec/lib/jasmine-matchers.js on lines 195..197

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

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

    matchers.toBeFalse = function() {
        return this.actual === false || this.actual instanceof Boolean && this.actual.valueOf() === false;
    };
Severity: Major
Found in legacy/spec/lib/jasmine-matchers.js and 1 other location - About 1 hr to fix
legacy/spec/lib/jasmine-matchers.js on lines 187..189

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

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

                                    !_.isEmpty(state.vm.submissionError()) ? m('.card.card-error.u-radius.zindex-10.u-marginbottom-30.fontsize-smaller', m('.u-marginbottom-10.fontweight-bold', m.trust(state.vm.submissionError()))) : '',
Severity: Major
Found in legacy/src/c/payment-slip.js and 1 other location - About 1 hr to fix
legacy/src/c/payment-credit-card.js on lines 460..466

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

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

    if(data) {
      try {
        return _user=JSON.parse(data);
      } catch(e) {
        console.error('[CatarseAnalytics._getUser] error parsing data '+JSON.stringify(data), e);
Severity: Major
Found in legacy/spec/lib/analytics.js and 1 other location - About 1 hr to fix
legacy/spec/lib/analytics.js on lines 176..182

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

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

    if(data) {
      try {
        return  _project=JSON.parse(data);
      } catch(e) {
        console.error('[CatarseAnalytics._getProject] error parsing data '+JSON.stringify(data), e);
Severity: Major
Found in legacy/spec/lib/analytics.js and 1 other location - About 1 hr to fix
legacy/spec/lib/analytics.js on lines 163..169

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

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

        it('should show re-subscription button', function() {
            expect(inactiveSubscriptionMissingPayment.contains('Assinar novamente')).toBeTruthy();
            expect(userCanceledItsOwnSubscription.contains('Assinar novamente')).toBeTruthy();
        });
legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

    matchers.toBeHtmlString = function() {
        return matchers.toBeString.call(this) && this.actual.search(/<([a-z]+)([^<]+)*(?:>(.*)<\/\1>|\s+\/>)/) !== -1;
    };
Severity: Major
Found in legacy/spec/lib/jasmine-matchers.js and 1 other location - About 1 hr to fix
legacy/spec/lib/jasmine-matchers.js on lines 544..546

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

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

    matchers.toBeWhitespace = function() {
        return matchers.toBeString.call(this) && this.actual.search(/\S/) === -1;
    };
Severity: Major
Found in legacy/spec/lib/jasmine-matchers.js and 1 other location - About 1 hr to fix
legacy/spec/lib/jasmine-matchers.js on lines 521..523

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

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

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

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

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

Refactorings

Further Reading

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

        it('should have address state as select input', () => {

            expect($output.has('input#address-state')).toBeFalse();
            expect($output.has('select#address-state')).toBeTrue();
        });
Severity: Major
Found in legacy/spec/components/root/projects-payment.spec.js and 2 other locations - About 1 hr to fix
legacy/spec/components/admin-transaction.spec.js on lines 21..24
legacy/spec/components/root/thank-you.spec.js on lines 45..48

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

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