teamdigitale/italia-app

View on GitHub
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx

Summary

Maintainability
F
3 days
Test Coverage

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

  it("given a DISABLED 'reminder_status' then the switch should be off", () => {
    const screen = renderScreen(undefined, ReminderStatusEnum.DISABLED);
    expect(screen).not.toBeNull();

    const toggle = screen.getByTestId("remindersPreferenceSwitch");
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 24..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 84.

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

  it("given an ENABLED 'reminder_status'then the switch should be on", () => {
    const screen = renderScreen(undefined, ReminderStatusEnum.ENABLED);
    expect(screen).not.toBeNull();

    const toggle = screen.getByTestId("remindersPreferenceSwitch");
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 32..38

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

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

  it("given a FULL 'push_notifications_content_type' then the switch should be on", () => {
    const screen = renderScreen(PushNotificationsContentTypeEnum.FULL);
    expect(screen).not.toBeNull();

    const toggle = screen.getByTestId("previewsPreferenceSwitch");
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 56..62

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

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

  it("given an ANONYMOUS 'push_notifications_content_type' then the switch should be off", () => {
    const screen = renderScreen(PushNotificationsContentTypeEnum.ANONYMOUS);
    expect(screen).not.toBeNull();

    const toggle = screen.getByTestId("previewsPreferenceSwitch");
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 48..54

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

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

  it("given an undefined 'push_notifications_content_type' then the switch should be off", () => {
    const screen = renderScreen();
    expect(screen).not.toBeNull();

    const toggle = screen.getByTestId("previewsPreferenceSwitch");
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 16..22

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

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

  it("given an undefined 'reminder_status' then the switch should be off", () => {
    const screen = renderScreen();
    expect(screen).not.toBeNull();

    const toggle = screen.getByTestId("remindersPreferenceSwitch");
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 40..46

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, disabled  preview, enabled   reminder, not updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.ANONYMOUS,
      ReminderStatusEnum.ENABLED,
      false
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 104..111
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 112..119
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 128..135
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 152..159
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 160..167
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 168..175
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 176..183

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, enabled   preview, enabled   reminder, not updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.FULL,
      ReminderStatusEnum.ENABLED,
      false
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 104..111
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 112..119
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 120..127
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 128..135
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 152..159
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 160..167
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 176..183

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, enabled   preview, enabled   reminder,     updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.FULL,
      ReminderStatusEnum.ENABLED,
      true
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 104..111
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 112..119
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 120..127
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 128..135
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 152..159
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 160..167
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 168..175

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, disabled  preview, disabled  reminder,     updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.ANONYMOUS,
      ReminderStatusEnum.DISABLED,
      true
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 104..111
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 120..127
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 128..135
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 152..159
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 160..167
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 168..175
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 176..183

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, disabled  preview, enabled   reminder,     updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.ANONYMOUS,
      ReminderStatusEnum.ENABLED,
      true
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 104..111
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 112..119
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 120..127
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 152..159
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 160..167
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 168..175
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 176..183

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, disabled  preview, disabled  reminder, not updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.ANONYMOUS,
      ReminderStatusEnum.DISABLED,
      false
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 112..119
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 120..127
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 128..135
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 152..159
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 160..167
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 168..175
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 176..183

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, enabled   preview, disabled  reminder,     updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.FULL,
      ReminderStatusEnum.DISABLED,
      true
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 104..111
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 112..119
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 120..127
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 128..135
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 152..159
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 168..175
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 176..183

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

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

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

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

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

Refactorings

Further Reading

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

  it("should match snapshot, enabled   preview, disabled  reminder, not updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.FULL,
      ReminderStatusEnum.DISABLED,
      false
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 104..111
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 112..119
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 120..127
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 128..135
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 160..167
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 168..175
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 176..183

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

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

  it("should match snapshot, enabled   preview, undefined reminder,     updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.FULL,
      undefined,
      true
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 88..95
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 96..103
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 136..143

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

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

  it("should match snapshot, undefined preview, disabled  reminder, not updating", () => {
    const screen = renderScreen(undefined, ReminderStatusEnum.DISABLED, false);
    expect(screen.toJSON()).toMatchSnapshot();
  });
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 76..79
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 80..83
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 84..87

Duplicated Code

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

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

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

Tuning

This issue has a mass of 51.

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

  it("should match snapshot, disabled  preview, undefined reminder,     updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.ANONYMOUS,
      undefined,
      true
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 88..95
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 136..143
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 144..151

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

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

  it("should match snapshot, undefined preview, disabled  reminder,     updating", () => {
    const screen = renderScreen(undefined, ReminderStatusEnum.DISABLED, true);
    expect(screen.toJSON()).toMatchSnapshot();
  });
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 72..75
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 80..83
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 84..87

Duplicated Code

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

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

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

Tuning

This issue has a mass of 51.

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

  it("should match snapshot, disabled  preview, undefined reminder, not updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.ANONYMOUS,
      undefined,
      false
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 96..103
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 136..143
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 144..151

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

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

  it("should match snapshot, undefined preview, enabled   reminder,     updating", () => {
    const screen = renderScreen(undefined, ReminderStatusEnum.ENABLED, true);
    expect(screen.toJSON()).toMatchSnapshot();
  });
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 72..75
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 76..79
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 80..83

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

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

  it("should match snapshot, undefined preview, enabled   reminder, not updating", () => {
    const screen = renderScreen(undefined, ReminderStatusEnum.ENABLED, false);
    expect(screen.toJSON()).toMatchSnapshot();
  });
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 72..75
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 76..79
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 84..87

Duplicated Code

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

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

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

Tuning

This issue has a mass of 51.

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

  it("should match snapshot, enabled   preview, undefined reminder, not updating", () => {
    const screen = renderScreen(
      PushNotificationsContentTypeEnum.FULL,
      undefined,
      false
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 88..95
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 96..103
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 144..151

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

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

  it("should match snapshot, undefined preview, undefined reminder,     updating", () => {
    const screen = renderScreen(undefined, undefined, true);
    expect(screen.toJSON()).toMatchSnapshot();
  });
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 64..67

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

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

  it("should match snapshot, undefined preview, undefined reminder, not updating", () => {
    const screen = renderScreen(undefined, undefined, false);
    expect(screen.toJSON()).toMatchSnapshot();
  });
ts/screens/profile/__test__/NotificationsPreferencesScreen.test.tsx on lines 68..71

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

There are no issues that match your filters.

Category
Status