hhff/spree-ember

View on GitHub

Showing 70 of 82 total issues

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

test('it works', function(assert) {
  var UserRouteActionsObject = Ember.Object.extend(UserRouteActionsMixin);
  var subject = UserRouteActionsObject.create();
  assert.ok(subject);
});
Severity: Major
Found in packages/auth/tests/unit/mixins/user-route-actions-test.js and 1 other location - About 1 hr to fix
packages/core/tests/unit/mixins/can-checkout-test.js on lines 7..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 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

export default Ember.Component.extend({
  layout: layout,
  action: 'transitionCheckoutState',

  actions: {
Severity: Major
Found in packages/storefront/addon/components/spree-order.js and 1 other location - About 1 hr to fix
packages/storefront/addon/components/spree-checkout.js on lines 21..30

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

test('it works', function(assert) {
  var CanCheckoutObject = Ember.Object.extend(CanCheckoutMixin);
  var subject = CanCheckoutObject.create();
  assert.ok(subject);
});
Severity: Major
Found in packages/core/tests/unit/mixins/can-checkout-test.js and 1 other location - About 1 hr to fix
packages/auth/tests/unit/mixins/user-route-actions-test.js on lines 8..12

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

export default Ember.Component.extend({
  layout: layout,
  action: 'transitionCheckoutState',

  actions: {
Severity: Major
Found in packages/storefront/addon/components/spree-checkout.js and 1 other location - About 1 hr to fix
packages/storefront/addon/components/spree-order.js on lines 21..30

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

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

  andThen(function() {
    assert.equal(currentPath(), 'spree.signin');
    fillIn('input[placeholder="Email"]', 'spree-ember@example.com');
    fillIn('input[placeholder="Password"]', 'spree123');
    click('button[type="submit"]');
Severity: Minor
Found in packages/auth/tests/acceptance/signin-test.js and 1 other location - About 45 mins to fix
packages/auth/tests/acceptance/signin-test.js on lines 40..45

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

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

  andThen(function() {
    assert.equal(currentPath(), 'spree.signin');
    fillIn('input[placeholder="Email"]', 'spree-ember@example.com');
    fillIn('input[placeholder="Password"]', 'spree123');
    click('button[type="submit"]');
Severity: Minor
Found in packages/auth/tests/acceptance/signin-test.js and 1 other location - About 45 mins to fix
packages/auth/tests/acceptance/signin-test.js on lines 24..29

Duplicated Code

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

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

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

Tuning

This issue has a mass of 50.

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

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

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

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

Refactorings

Further Reading

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

test('products index', function(assert) {
  visit('/products');
  
  andThen(function() {
    assert.equal(currentPath(), 'spree.products.index');
Severity: Major
Found in packages/storefront/tests/acceptance/router-test.js and 3 other locations - About 40 mins to fix
packages/storefront/tests/acceptance/router-test.js on lines 20..26
packages/storefront/tests/acceptance/router-test.js on lines 36..42
packages/storefront/tests/acceptance/router-test.js on lines 44..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 4 locations. Consider refactoring.
Open

test('sanity check', function(assert) {
  visit('/');
  
  andThen(function() {
    assert.equal(currentPath(), 'spree.index');
Severity: Major
Found in packages/storefront/tests/acceptance/router-test.js and 3 other locations - About 40 mins to fix
packages/storefront/tests/acceptance/router-test.js on lines 28..34
packages/storefront/tests/acceptance/router-test.js on lines 36..42
packages/storefront/tests/acceptance/router-test.js on lines 44..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 4 locations. Consider refactoring.
Open

test('products show', function(assert) {
  visit('/products/ruby-on-rails-baseball-jersey');
  
  andThen(function() {
    assert.equal(currentPath(), 'spree.products.show');
Severity: Major
Found in packages/storefront/tests/acceptance/router-test.js and 3 other locations - About 40 mins to fix
packages/storefront/tests/acceptance/router-test.js on lines 20..26
packages/storefront/tests/acceptance/router-test.js on lines 28..34
packages/storefront/tests/acceptance/router-test.js on lines 44..50

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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 4 locations. Consider refactoring.
Open

test('taxons show', function(assert) {
  visit('/t/categories/bags');
  
  andThen(function() {
    assert.equal(currentPath(), 'spree.taxons.index');
Severity: Major
Found in packages/storefront/tests/acceptance/router-test.js and 3 other locations - About 40 mins to fix
packages/storefront/tests/acceptance/router-test.js on lines 20..26
packages/storefront/tests/acceptance/router-test.js on lines 28..34
packages/storefront/tests/acceptance/router-test.js on lines 36..42

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/stock-location-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/zone-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/shipping-category-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/taxon-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/user-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/image-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/line-item-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/country-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/shipping-method-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/order-test.js on lines 30..34
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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

test('it exists', function(assert) {
  var model = this.subject();
  // var store = this.store();
  assert.ok(!!model);
});
Severity: Major
Found in packages/core/tests/unit/models/order-test.js and 19 other locations - About 35 mins to fix
packages/core/tests/unit/models/address-test.js on lines 14..18
packages/core/tests/unit/models/country-test.js on lines 13..17
packages/core/tests/unit/models/image-test.js on lines 11..15
packages/core/tests/unit/models/line-item-test.js on lines 24..28
packages/core/tests/unit/models/payment-method-test.js on lines 11..15
packages/core/tests/unit/models/product-property-test.js on lines 15..19
packages/core/tests/unit/models/product-test.js on lines 15..19
packages/core/tests/unit/models/shipment-test.js on lines 26..30
packages/core/tests/unit/models/shipping-category-test.js on lines 11..15
packages/core/tests/unit/models/shipping-method-test.js on lines 15..19
packages/core/tests/unit/models/shipping-rate-test.js on lines 15..19
packages/core/tests/unit/models/source-test.js on lines 13..17
packages/core/tests/unit/models/state-test.js on lines 13..17
packages/core/tests/unit/models/stock-location-test.js on lines 11..15
packages/core/tests/unit/models/taxon-test.js on lines 13..17
packages/core/tests/unit/models/taxonomy-test.js on lines 13..17
packages/core/tests/unit/models/user-test.js on lines 11..15
packages/core/tests/unit/models/variant-test.js on lines 15..19
packages/core/tests/unit/models/zone-test.js on lines 11..15

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

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