Showing 2,206 of 2,206 total issues

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'อีก ไม่กี่วินาที',
    'in a few seconds'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/th.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'Якин фурсат ичида',
    'in a few seconds'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'em poucos segundos',
    'in seconds'
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'ਕੁਝ ਸਕਿੰਟ ਵਿੱਚ',
    'ਕੁਝ ਸਕਿੰਟ ਵਿੱਚ'
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(moment().add({ s: 30 }).fromNow(), 'અમુક પળો મા', 'અમુક પળો મા');
  assert.equal(moment().add({ d: 5 }).fromNow(), '5 દિવસ મા', '5 દિવસ મા');
});
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

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

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

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

Refactorings

Further Reading

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

  it('logger.verbose should run console.log in development', () => {
    const loggerInstance = loggerWeb('');
    loggerInstance.verbose(event, message);

    expect(global.console.log).toHaveBeenCalledWith({ event, message });
Severity: Major
Found in src/app/lib/logger.web.test.js and 6 other locations - About 2 hrs to fix
src/app/lib/logger.web.test.js on lines 25..31
src/app/lib/logger.web.test.js on lines 75..81
src/app/lib/logger.web.test.js on lines 83..89
src/app/lib/logger.web.test.js on lines 91..97
src/app/lib/logger.web.test.js on lines 99..105
src/app/lib/logger.web.test.js on lines 115..121

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'бирнече секунд ичинде',
    'in a few seconds'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'بعد 30 ثانية',
    'in a few seconds'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ar.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'ní ìṣẹ́jú aayá die',
    'ní ìsẹjú aayá die'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/yo.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

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

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

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

Refactorings

Further Reading

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

  it('logger.error should run console.error in production', () => {
    const loggerInstance = loggerWeb('');
    loggerInstance.error(event, message);

    expect(global.console.error).toHaveBeenCalledWith({ event, message });
Severity: Major
Found in src/app/lib/logger.web.test.js and 6 other locations - About 2 hrs to fix
src/app/lib/logger.web.test.js on lines 75..81
src/app/lib/logger.web.test.js on lines 83..89
src/app/lib/logger.web.test.js on lines 91..97
src/app/lib/logger.web.test.js on lines 99..105
src/app/lib/logger.web.test.js on lines 107..113
src/app/lib/logger.web.test.js on lines 115..121

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'за декілька секунд',
    'in seconds'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uk.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'inside just some seconds',
    'in a few seconds'
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'bir neçə saniyə sonra',
    'in a few seconds'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/az.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

  it('should correctly render amp navigation on non-navigation page', () => {
    const { container } = render(<Navigation />, {
      bbcOrigin: 'https://www.test.bbc.co.uk',
      id: 'c0000000000o',
      isAmp: true,
Severity: Major
Found in src/app/legacy/containers/Navigation/index.test.jsx and 5 other locations - About 2 hrs to fix
src/app/legacy/containers/Navigation/index.test.jsx on lines 13..24
src/app/legacy/containers/Navigation/index.test.jsx on lines 26..37
src/app/legacy/containers/Navigation/index.test.jsx on lines 39..50
src/app/legacy/containers/Navigation/index.test.jsx on lines 52..63
src/app/legacy/containers/Navigation/index.test.jsx on lines 78..89

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

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

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

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

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

Refactorings

Further Reading

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

  it('logger.error should run console.error in development', () => {
    const loggerInstance = loggerWeb('');
    loggerInstance.error(event, message);

    expect(global.console.error).toHaveBeenCalledWith({ event, message });
Severity: Major
Found in src/app/lib/logger.web.test.js and 6 other locations - About 2 hrs to fix
src/app/lib/logger.web.test.js on lines 25..31
src/app/lib/logger.web.test.js on lines 83..89
src/app/lib/logger.web.test.js on lines 91..97
src/app/lib/logger.web.test.js on lines 99..105
src/app/lib/logger.web.test.js on lines 107..113
src/app/lib/logger.web.test.js on lines 115..121

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

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

  it('should correctly render amp navigation on non-home navigation page', () => {
    const { container } = render(<Navigation />, {
      bbcOrigin: 'https://www.test.bbc.co.uk',
      id: 'c0000000000o',
      isAmp: true,
Severity: Major
Found in src/app/legacy/containers/Navigation/index.test.jsx and 5 other locations - About 2 hrs to fix
src/app/legacy/containers/Navigation/index.test.jsx on lines 13..24
src/app/legacy/containers/Navigation/index.test.jsx on lines 26..37
src/app/legacy/containers/Navigation/index.test.jsx on lines 52..63
src/app/legacy/containers/Navigation/index.test.jsx on lines 65..76
src/app/legacy/containers/Navigation/index.test.jsx on lines 78..89

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'काही सेकंदांमध्ये',
    'in a few seconds'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/mr.test.js and 22 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

  it('should correctly render amp navigation', () => {
    const { container } = render(<Navigation />, {
      bbcOrigin: 'https://www.test.bbc.co.uk',
      id: 'c0000000000o',
      isAmp: true,
Severity: Major
Found in src/app/legacy/containers/Navigation/index.test.jsx and 5 other locations - About 2 hrs to fix
src/app/legacy/containers/Navigation/index.test.jsx on lines 26..37
src/app/legacy/containers/Navigation/index.test.jsx on lines 39..50
src/app/legacy/containers/Navigation/index.test.jsx on lines 52..63
src/app/legacy/containers/Navigation/index.test.jsx on lines 65..76
src/app/legacy/containers/Navigation/index.test.jsx on lines 78..89

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

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

  it('should correctly render canonical navigation on non-home navigation page', () => {
    const { container } = render(<Navigation />, {
      bbcOrigin: 'https://www.test.bbc.co.uk',
      id: 'c0000000000o',
      isAmp: false,
Severity: Major
Found in src/app/legacy/containers/Navigation/index.test.jsx and 5 other locations - About 2 hrs to fix
src/app/legacy/containers/Navigation/index.test.jsx on lines 13..24
src/app/legacy/containers/Navigation/index.test.jsx on lines 26..37
src/app/legacy/containers/Navigation/index.test.jsx on lines 39..50
src/app/legacy/containers/Navigation/index.test.jsx on lines 65..76
src/app/legacy/containers/Navigation/index.test.jsx on lines 78..89

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

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

test('fromNow', () => {
  assert.equal(
    moment().add({ s: 30 }).fromNow(),
    'за неколико секунди',
    'in a few seconds'
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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