rvalenciano/ngx-cron-jobs

View on GitHub
src/app/lib/services/quartz.service.spec.ts

Summary

Maintainability
F
1 wk
Test Coverage

File quartz.service.spec.ts has 375 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { TestBed, inject } from '@angular/core/testing';

import { QuartzService } from './quartz.service';
import { DataService } from './data.service';
import * as fixture from '../fixture.spec';
Severity: Minor
Found in src/app/lib/services/quartz.service.spec.ts - About 5 hrs to fix

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

        it('should return default frequency on fromCron call with incorrect in length cron expression', () => {
          const expWrongOne = '0 * * * ?';
          const expWrongTwo = '0 * * * 1 2 3 ?';
          const expected = {
            baseFrequency: fixture.baseFrequency[0].value,
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 4 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 68..82

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

    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 parse "0 10 1 12 1 ?" as at 01:10:00am, on the 12th day, in January', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.year,
            minutes: [10],
            hours: [1],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 238..250

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

    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 parse "0 23 1 1 * ?" as at 01:23:00am, on the 1st day, every month', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.month,
            minutes: [23],
            hours: [1],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 210..222

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

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

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

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

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

    Refactorings

    Further Reading

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

        it ('should parse "0 10 1 ? * 2" as at 01:10:00am, on every Monday, every month', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.week,
            minutes: [10],
            hours: [1],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 2 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 182..194
    src/app/lib/services/quartz.service.spec.ts on lines 208..220

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

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

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

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

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

    Refactorings

    Further Reading

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

        it ('should parse "0 1 1 ? * 2" as At 01:01:00am, on every Monday, every month', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.week,
            minutes: [1],
            hours: [1],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 2 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 182..194
    src/app/lib/services/quartz.service.spec.ts on lines 138..150

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

    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 parse "0 10 2,14 * * ?" as at second :00, at minute :10, at 02am and 14pm, of every day', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.day,
            minutes: [10],
            hours: [2, 14],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 154..166

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

    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 return "0 10,14 * * * ?" when baseFrequency was set to hour on baseFrequencyForService and minutes set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.hour,
            minutes: [10, 14],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 112..124
    src/app/lib/services/posix.service.spec.ts on lines 314..326
    src/app/lib/services/quartz.service.spec.ts on lines 68..80

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

    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 return "0 * 1,10 * * ?" when baseFrequency was set to day on baseFrequencyForService and hours set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.day,
            minutes: [],
            hours: [1, 10],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 140..152
    src/app/lib/services/posix.service.spec.ts on lines 342..354
    src/app/lib/services/quartz.service.spec.ts on lines 96..108

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

    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 return "0 * * ? * 2,6" when baseFrequency was set to week on baseFrequencyForService and daysOfWeek set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.week,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 370..382

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

    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 return "0 * * 1,23 * ?" when baseFrequency was set to month on baseFrequencyForService and daysOfMonth set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.month,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 412..424

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

    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 parse "0 * 2,14 * * ?" as at second :00, every minute, at 02am and 14pm, of every day', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.day,
            minutes: [],
            hours: [2, 14],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 140..152
    src/app/lib/services/posix.service.spec.ts on lines 342..354
    src/app/lib/services/quartz.service.spec.ts on lines 296..308

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

    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 parse "0 4,10 * * * ?" as at second :00, at minutes :04 and :10, of every hour', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.hour,
            minutes: [4, 10],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 112..124
    src/app/lib/services/posix.service.spec.ts on lines 314..326
    src/app/lib/services/quartz.service.spec.ts on lines 268..280

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 96.

    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 return "0 * * * 3,4 ?" when baseFrequency was set to year on baseFrequencyForService and months set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.year,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 440..452

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

    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 parse "0 * * 1 * ?" as at second :00 of every minute, on the 1st day, every month', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.month,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 196..208
    src/app/lib/services/posix.service.spec.ts on lines 398..410
    src/app/lib/services/quartz.service.spec.ts on lines 352..364

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

    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 parse "0 4 * * * ?" as at second :00 of minute :04 of every hour', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.hour,
            minutes: [4],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 98..110
    src/app/lib/services/posix.service.spec.ts on lines 300..312
    src/app/lib/services/quartz.service.spec.ts on lines 255..267

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

    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 return "0 * 1 * * ?" when baseFrequency was set to day on baseFrequencyForService and hours set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.day,
            minutes: [],
            hours: [1],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 126..138
    src/app/lib/services/posix.service.spec.ts on lines 328..340
    src/app/lib/services/quartz.service.spec.ts on lines 82..94

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

    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 return "0 * * ? * 2" when baseFrequency was set to week on baseFrequencyForService and daysOfWeek set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.week,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 168..180
    src/app/lib/services/posix.service.spec.ts on lines 356..368
    src/app/lib/services/quartz.service.spec.ts on lines 124..136

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 95.

    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 parse "0 * * * 1 ?" as at second :00 of every minute, every day, in January', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.year,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 224..236
    src/app/lib/services/posix.service.spec.ts on lines 426..438
    src/app/lib/services/quartz.service.spec.ts on lines 380..392

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

    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 parse "0 * 2 * * ?" as every minute at second :00 between 02am and 03am', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.day,
            minutes: [],
            hours: [2],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 126..138
    src/app/lib/services/posix.service.spec.ts on lines 328..340
    src/app/lib/services/quartz.service.spec.ts on lines 282..294

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

    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 parse "0 * * ? * 2" as at second :00 of every minute, on every Monday, every month', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.week,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 168..180
    src/app/lib/services/posix.service.spec.ts on lines 356..368
    src/app/lib/services/quartz.service.spec.ts on lines 310..322

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

    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 return "0 * * 1 * ?" when baseFrequency was set to month on baseFrequencyForService and daysOfMonth set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.month,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 196..208
    src/app/lib/services/posix.service.spec.ts on lines 398..410
    src/app/lib/services/quartz.service.spec.ts on lines 152..164

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

    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 return "0 * * * 3 ?" when baseFrequency was set to year on baseFrequencyForService and months set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.year,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 224..236
    src/app/lib/services/posix.service.spec.ts on lines 426..438
    src/app/lib/services/quartz.service.spec.ts on lines 180..192

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

    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 return "0 10 * * * ?" when baseFrequency was set to hour on baseFrequencyForService and minutes set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.hour,
            minutes: [10],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 98..110
    src/app/lib/services/posix.service.spec.ts on lines 300..312
    src/app/lib/services/quartz.service.spec.ts on lines 54..66

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

    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 parse "0 * * * * ?" as at second :00 of every minute', () => {
          const expected = {
            baseFrequency: fixture.baseFrequencyForService.minute,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 5 other locations - About 2 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 84..96
    src/app/lib/services/posix.service.spec.ts on lines 286..298
    src/app/lib/services/posix.service.spec.ts on lines 384..396
    src/app/lib/services/quartz.service.spec.ts on lines 241..253
    src/app/lib/services/quartz.service.spec.ts on lines 338..350

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

    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 return "0 * * ? * *" when baseFrequency was set to week on baseFrequencyForService and daysOfWeek set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.week,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 5 other locations - About 2 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 84..96
    src/app/lib/services/posix.service.spec.ts on lines 286..298
    src/app/lib/services/posix.service.spec.ts on lines 384..396
    src/app/lib/services/quartz.service.spec.ts on lines 40..52
    src/app/lib/services/quartz.service.spec.ts on lines 241..253

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

    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 return "0 * * * * ?" when baseFrequency was set to minute on baseFrequencyForService', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.minute,
            minutes: [],
            hours: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 5 other locations - About 2 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 84..96
    src/app/lib/services/posix.service.spec.ts on lines 286..298
    src/app/lib/services/posix.service.spec.ts on lines 384..396
    src/app/lib/services/quartz.service.spec.ts on lines 40..52
    src/app/lib/services/quartz.service.spec.ts on lines 338..350

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

    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 return "0 10 4 2 3,4 ?" when baseFrequency was set to year on baseFrequencyForService and months set', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.year,
            minutes: [10],
            hours: [4],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 2 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 455..467

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should return empty string when baseFrequency key of frequency object was set to none on' +
          'baseFrequencyForService', () => {
          const frequency = {
            baseFrequency: fixture.baseFrequencyForService.none,
            minutes: [],
    Severity: Major
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 2 hrs to fix
    src/app/lib/services/posix.service.spec.ts on lines 272..284

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

    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

      beforeEach(() => {
        TestBed.configureTestingModule({
          providers: [QuartzService,
          DataService]
        });
    Severity: Minor
    Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 35 mins to fix
    src/app/lib/services/posix.service.spec.ts on lines 12..21

    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