cucumber/cucumber-js

View on GitHub
src/runtime/test_case_runner_spec.js

Summary

Maintainability
F
2 wks
Test Coverage

File test_case_runner_spec.js has 558 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import TestCaseHookDefinition from '../models/test_case_hook_definition'
import TestCaseRunner from './test_case_runner'
import Status from '../status'
import StepRunner from './step_runner'
import { EventEmitter } from 'events'
Severity: Major
Found in src/runtime/test_case_runner_spec.js - About 1 day to fix

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

          beforeEach(async function() {
            const testCaseHookDefinition = new TestCaseHookDefinition({
              code() {
                throw new Error('error')
              },
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 1 day to fix
    src/runtime/test_case_runner_spec.js on lines 435..462

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

    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(async function() {
            const testCaseHookDefinition = new TestCaseHookDefinition({
              code() {
                throw new Error('error')
              },
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 1 day to fix
    src/runtime/test_case_runner_spec.js on lines 521..548

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

    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('emits test-step-finished', function() {
            expect(this.onTestStepFinished).to.have.been.calledTwice
            expect(this.onTestStepFinished).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } },
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 7 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 583..595

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

    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('emits test-step-finished', function() {
            expect(this.onTestStepFinished).to.have.been.calledTwice
            expect(this.onTestStepFinished).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } },
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 7 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 497..509

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

    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('emits test-step-started', function() {
            expect(this.onTestStepStarted).to.have.been.calledTwice
            expect(this.onTestStepStarted).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 6 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 571..581

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

    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('emits test-step-started', function() {
            expect(this.onTestStepStarted).to.have.been.calledTwice
            expect(this.onTestStepStarted).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 6 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 485..495

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

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

          it('emits test-case-prepared', function() {
            expect(this.onTestCasePrepared).to.have.been.calledOnce
            expect(this.onTestCasePrepared).to.have.been.calledWith({
              steps: [
                {
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 2 other locations - About 4 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 174..185
    src/runtime/test_case_runner_spec.js on lines 388..399

    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

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

          it('emits test-case-prepared', function() {
            expect(this.onTestCasePrepared).to.have.been.calledOnce
            expect(this.onTestCasePrepared).to.have.been.calledWith({
              steps: [
                {
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 2 other locations - About 4 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 102..113
    src/runtime/test_case_runner_spec.js on lines 174..185

    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

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

          it('emits test-case-prepared', function() {
            expect(this.onTestCasePrepared).to.have.been.calledOnce
            expect(this.onTestCasePrepared).to.have.been.calledWith({
              steps: [
                {
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 2 other locations - About 4 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 102..113
    src/runtime/test_case_runner_spec.js on lines 388..399

    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('emits test-step-finished', function() {
            expect(this.onTestStepFinished).to.have.been.calledOnce
            expect(this.onTestStepFinished).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } },
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 351..358

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

    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('emits test-step-finished', function() {
            expect(this.onTestStepFinished).to.have.been.calledOnce
            expect(this.onTestStepFinished).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } },
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 416..423

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

    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('emits test-case-prepared', function() {
            expect(this.onTestCasePrepared).to.have.been.calledOnce
            expect(this.onTestCasePrepared).to.have.been.calledWith({
              steps: [
                {
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 328..334

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

    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('emits test-case-prepared', function() {
            expect(this.onTestCasePrepared).to.have.been.calledOnce
            expect(this.onTestCasePrepared).to.have.been.calledWith({
              steps: [{ sourceLocation: { line: 2, uri: 'path/to/feature' } }],
              sourceLocation: { line: 1, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 257..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 112.

    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('emits test-case-finished', function() {
            expect(this.onTestCaseFinished).to.have.been.calledOnce
            expect(this.onTestCaseFinished).to.have.been.calledWith({
              result: { duration: 1, status: Status.PASSED },
              sourceLocation: { line: 1, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 5 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 69..75
    src/runtime/test_case_runner_spec.js on lines 360..366
    src/runtime/test_case_runner_spec.js on lines 425..431
    src/runtime/test_case_runner_spec.js on lines 511..517
    src/runtime/test_case_runner_spec.js on lines 597..603

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

    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('emits test-case-finished', function() {
            expect(this.onTestCaseFinished).to.have.been.calledOnce
            expect(this.onTestCaseFinished).to.have.been.calledWith({
              result: { duration: 0, status: Status.UNDEFINED },
              sourceLocation: { line: 1, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 5 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 69..75
    src/runtime/test_case_runner_spec.js on lines 139..145
    src/runtime/test_case_runner_spec.js on lines 425..431
    src/runtime/test_case_runner_spec.js on lines 511..517
    src/runtime/test_case_runner_spec.js on lines 597..603

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

    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('emits test-case-finished', function() {
            expect(this.onTestCaseFinished).to.have.been.calledOnce
            expect(this.onTestCaseFinished).to.have.been.calledWith({
              result: { duration: 0, status: Status.SKIPPED },
              sourceLocation: { line: 1, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 5 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 69..75
    src/runtime/test_case_runner_spec.js on lines 139..145
    src/runtime/test_case_runner_spec.js on lines 360..366
    src/runtime/test_case_runner_spec.js on lines 425..431
    src/runtime/test_case_runner_spec.js on lines 597..603

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

    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('emits test-case-finished', function() {
            expect(this.onTestCaseFinished).to.have.been.calledOnce
            expect(this.onTestCaseFinished).to.have.been.calledWith({
              result: { duration: 0, status: Status.PASSED },
              sourceLocation: { line: 1, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 5 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 139..145
    src/runtime/test_case_runner_spec.js on lines 360..366
    src/runtime/test_case_runner_spec.js on lines 425..431
    src/runtime/test_case_runner_spec.js on lines 511..517
    src/runtime/test_case_runner_spec.js on lines 597..603

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

    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('emits test-case-finished', function() {
            expect(this.onTestCaseFinished).to.have.been.calledOnce
            expect(this.onTestCaseFinished).to.have.been.calledWith({
              result: { duration: 0, status: Status.SKIPPED },
              sourceLocation: { line: 1, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 5 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 69..75
    src/runtime/test_case_runner_spec.js on lines 139..145
    src/runtime/test_case_runner_spec.js on lines 360..366
    src/runtime/test_case_runner_spec.js on lines 425..431
    src/runtime/test_case_runner_spec.js on lines 511..517

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

    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('emits test-case-finished', function() {
            expect(this.onTestCaseFinished).to.have.been.calledOnce
            expect(this.onTestCaseFinished).to.have.been.calledWith({
              result: { duration: 0, status: Status.SKIPPED },
              sourceLocation: { line: 1, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 5 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 69..75
    src/runtime/test_case_runner_spec.js on lines 139..145
    src/runtime/test_case_runner_spec.js on lines 360..366
    src/runtime/test_case_runner_spec.js on lines 511..517
    src/runtime/test_case_runner_spec.js on lines 597..603

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

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

          it('emits test-step-started', function() {
            expect(this.onTestStepStarted).to.have.been.calledOnce
            expect(this.onTestStepStarted).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 122..128
    src/runtime/test_case_runner_spec.js on lines 194..200
    src/runtime/test_case_runner_spec.js on lines 343..349
    src/runtime/test_case_runner_spec.js on lines 408..414

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

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

          it('emits test-step-started', function() {
            expect(this.onTestStepStarted).to.have.been.calledOnce
            expect(this.onTestStepStarted).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 122..128
    src/runtime/test_case_runner_spec.js on lines 276..282
    src/runtime/test_case_runner_spec.js on lines 343..349
    src/runtime/test_case_runner_spec.js on lines 408..414

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

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

          it('emits test-step-started', function() {
            expect(this.onTestStepStarted).to.have.been.calledOnce
            expect(this.onTestStepStarted).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 194..200
    src/runtime/test_case_runner_spec.js on lines 276..282
    src/runtime/test_case_runner_spec.js on lines 343..349
    src/runtime/test_case_runner_spec.js on lines 408..414

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

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

          it('emits test-step-started', function() {
            expect(this.onTestStepStarted).to.have.been.calledOnce
            expect(this.onTestStepStarted).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 122..128
    src/runtime/test_case_runner_spec.js on lines 194..200
    src/runtime/test_case_runner_spec.js on lines 276..282
    src/runtime/test_case_runner_spec.js on lines 408..414

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

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

          it('emits test-step-started', function() {
            expect(this.onTestStepStarted).to.have.been.calledOnce
            expect(this.onTestStepStarted).to.have.been.calledWith({
              index: 0,
              testCase: { sourceLocation: { line: 1, uri: 'path/to/feature' } }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 4 other locations - About 3 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 122..128
    src/runtime/test_case_runner_spec.js on lines 194..200
    src/runtime/test_case_runner_spec.js on lines 276..282
    src/runtime/test_case_runner_spec.js on lines 343..349

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 62..67
    src/runtime/test_case_runner_spec.js on lines 115..120
    src/runtime/test_case_runner_spec.js on lines 269..274
    src/runtime/test_case_runner_spec.js on lines 336..341
    src/runtime/test_case_runner_spec.js on lines 401..406
    src/runtime/test_case_runner_spec.js on lines 478..483
    src/runtime/test_case_runner_spec.js on lines 564..569

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 115..120
    src/runtime/test_case_runner_spec.js on lines 187..192
    src/runtime/test_case_runner_spec.js on lines 269..274
    src/runtime/test_case_runner_spec.js on lines 336..341
    src/runtime/test_case_runner_spec.js on lines 401..406
    src/runtime/test_case_runner_spec.js on lines 478..483
    src/runtime/test_case_runner_spec.js on lines 564..569

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 62..67
    src/runtime/test_case_runner_spec.js on lines 115..120
    src/runtime/test_case_runner_spec.js on lines 187..192
    src/runtime/test_case_runner_spec.js on lines 269..274
    src/runtime/test_case_runner_spec.js on lines 336..341
    src/runtime/test_case_runner_spec.js on lines 401..406
    src/runtime/test_case_runner_spec.js on lines 564..569

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 62..67
    src/runtime/test_case_runner_spec.js on lines 115..120
    src/runtime/test_case_runner_spec.js on lines 187..192
    src/runtime/test_case_runner_spec.js on lines 269..274
    src/runtime/test_case_runner_spec.js on lines 401..406
    src/runtime/test_case_runner_spec.js on lines 478..483
    src/runtime/test_case_runner_spec.js on lines 564..569

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 62..67
    src/runtime/test_case_runner_spec.js on lines 115..120
    src/runtime/test_case_runner_spec.js on lines 187..192
    src/runtime/test_case_runner_spec.js on lines 269..274
    src/runtime/test_case_runner_spec.js on lines 336..341
    src/runtime/test_case_runner_spec.js on lines 478..483
    src/runtime/test_case_runner_spec.js on lines 564..569

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 62..67
    src/runtime/test_case_runner_spec.js on lines 115..120
    src/runtime/test_case_runner_spec.js on lines 187..192
    src/runtime/test_case_runner_spec.js on lines 336..341
    src/runtime/test_case_runner_spec.js on lines 401..406
    src/runtime/test_case_runner_spec.js on lines 478..483
    src/runtime/test_case_runner_spec.js on lines 564..569

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 62..67
    src/runtime/test_case_runner_spec.js on lines 187..192
    src/runtime/test_case_runner_spec.js on lines 269..274
    src/runtime/test_case_runner_spec.js on lines 336..341
    src/runtime/test_case_runner_spec.js on lines 401..406
    src/runtime/test_case_runner_spec.js on lines 478..483
    src/runtime/test_case_runner_spec.js on lines 564..569

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

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

          it('emits test-case-started', function() {
            expect(this.onTestCaseStarted).to.have.been.calledOnce
            expect(this.onTestCaseStarted).to.have.been.calledWith({
              sourceLocation: { line: 1, uri: 'path/to/feature' }
            })
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 7 other locations - About 2 hrs to fix
    src/runtime/test_case_runner_spec.js on lines 62..67
    src/runtime/test_case_runner_spec.js on lines 115..120
    src/runtime/test_case_runner_spec.js on lines 187..192
    src/runtime/test_case_runner_spec.js on lines 269..274
    src/runtime/test_case_runner_spec.js on lines 336..341
    src/runtime/test_case_runner_spec.js on lines 401..406
    src/runtime/test_case_runner_spec.js on lines 478..483

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

    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

              steps: [
                { actionLocation: { line: 4, uri: 'path/to/hooks' } },
                {
                  actionLocation: { line: 3, uri: 'path/to/steps' },
                  sourceLocation: { line: 2, uri: 'path/to/feature' }
    Severity: Major
    Found in src/runtime/test_case_runner_spec.js and 1 other location - About 1 hr to fix
    src/formatter/progress_bar_formatter_spec.js on lines 53..59

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

    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