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 561 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { afterEach, beforeEach, describe, it } from 'mocha'
import { expect } from 'chai'
import sinon from 'sinon'
import TestCaseHookDefinition from '../models/test_case_hook_definition'
import TestCaseRunner from './test_case_runner'
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 438..465

    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 524..551

    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.callCount(2)
            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 586..598

    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.callCount(2)
            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 500..512

    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.callCount(2)
            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 574..584

    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.callCount(2)
            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 488..498

    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.callCount(1)
            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 177..188
    src/runtime/test_case_runner_spec.js on lines 391..402

    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.callCount(1)
            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 105..116
    src/runtime/test_case_runner_spec.js on lines 177..188

    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.callCount(1)
            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 105..116
    src/runtime/test_case_runner_spec.js on lines 391..402

    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.callCount(1)
            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 354..361

    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.callCount(1)
            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 419..426

    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.callCount(1)
            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 260..270

    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.callCount(1)
            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 331..337

    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.callCount(1)
            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 72..78
    src/runtime/test_case_runner_spec.js on lines 142..148
    src/runtime/test_case_runner_spec.js on lines 428..434
    src/runtime/test_case_runner_spec.js on lines 514..520
    src/runtime/test_case_runner_spec.js on lines 600..606

    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.callCount(1)
            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 142..148
    src/runtime/test_case_runner_spec.js on lines 363..369
    src/runtime/test_case_runner_spec.js on lines 428..434
    src/runtime/test_case_runner_spec.js on lines 514..520
    src/runtime/test_case_runner_spec.js on lines 600..606

    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.callCount(1)
            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 72..78
    src/runtime/test_case_runner_spec.js on lines 142..148
    src/runtime/test_case_runner_spec.js on lines 363..369
    src/runtime/test_case_runner_spec.js on lines 428..434
    src/runtime/test_case_runner_spec.js on lines 600..606

    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.callCount(1)
            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 72..78
    src/runtime/test_case_runner_spec.js on lines 363..369
    src/runtime/test_case_runner_spec.js on lines 428..434
    src/runtime/test_case_runner_spec.js on lines 514..520
    src/runtime/test_case_runner_spec.js on lines 600..606

    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.callCount(1)
            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 72..78
    src/runtime/test_case_runner_spec.js on lines 142..148
    src/runtime/test_case_runner_spec.js on lines 363..369
    src/runtime/test_case_runner_spec.js on lines 514..520
    src/runtime/test_case_runner_spec.js on lines 600..606

    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.callCount(1)
            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 72..78
    src/runtime/test_case_runner_spec.js on lines 142..148
    src/runtime/test_case_runner_spec.js on lines 363..369
    src/runtime/test_case_runner_spec.js on lines 428..434
    src/runtime/test_case_runner_spec.js on lines 514..520

    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.callCount(1)
            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 125..131
    src/runtime/test_case_runner_spec.js on lines 197..203
    src/runtime/test_case_runner_spec.js on lines 346..352
    src/runtime/test_case_runner_spec.js on lines 411..417

    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.callCount(1)
            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 125..131
    src/runtime/test_case_runner_spec.js on lines 197..203
    src/runtime/test_case_runner_spec.js on lines 279..285
    src/runtime/test_case_runner_spec.js on lines 346..352

    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.callCount(1)
            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 125..131
    src/runtime/test_case_runner_spec.js on lines 279..285
    src/runtime/test_case_runner_spec.js on lines 346..352
    src/runtime/test_case_runner_spec.js on lines 411..417

    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.callCount(1)
            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 125..131
    src/runtime/test_case_runner_spec.js on lines 197..203
    src/runtime/test_case_runner_spec.js on lines 279..285
    src/runtime/test_case_runner_spec.js on lines 411..417

    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.callCount(1)
            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 197..203
    src/runtime/test_case_runner_spec.js on lines 279..285
    src/runtime/test_case_runner_spec.js on lines 346..352
    src/runtime/test_case_runner_spec.js on lines 411..417

    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.callCount(1)
            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 65..70
    src/runtime/test_case_runner_spec.js on lines 118..123
    src/runtime/test_case_runner_spec.js on lines 190..195
    src/runtime/test_case_runner_spec.js on lines 272..277
    src/runtime/test_case_runner_spec.js on lines 404..409
    src/runtime/test_case_runner_spec.js on lines 481..486
    src/runtime/test_case_runner_spec.js on lines 567..572

    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.callCount(1)
            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 65..70
    src/runtime/test_case_runner_spec.js on lines 118..123
    src/runtime/test_case_runner_spec.js on lines 190..195
    src/runtime/test_case_runner_spec.js on lines 272..277
    src/runtime/test_case_runner_spec.js on lines 339..344
    src/runtime/test_case_runner_spec.js on lines 404..409
    src/runtime/test_case_runner_spec.js on lines 481..486

    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.callCount(1)
            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 65..70
    src/runtime/test_case_runner_spec.js on lines 118..123
    src/runtime/test_case_runner_spec.js on lines 190..195
    src/runtime/test_case_runner_spec.js on lines 339..344
    src/runtime/test_case_runner_spec.js on lines 404..409
    src/runtime/test_case_runner_spec.js on lines 481..486
    src/runtime/test_case_runner_spec.js on lines 567..572

    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.callCount(1)
            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 65..70
    src/runtime/test_case_runner_spec.js on lines 118..123
    src/runtime/test_case_runner_spec.js on lines 272..277
    src/runtime/test_case_runner_spec.js on lines 339..344
    src/runtime/test_case_runner_spec.js on lines 404..409
    src/runtime/test_case_runner_spec.js on lines 481..486
    src/runtime/test_case_runner_spec.js on lines 567..572

    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.callCount(1)
            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 65..70
    src/runtime/test_case_runner_spec.js on lines 118..123
    src/runtime/test_case_runner_spec.js on lines 190..195
    src/runtime/test_case_runner_spec.js on lines 272..277
    src/runtime/test_case_runner_spec.js on lines 339..344
    src/runtime/test_case_runner_spec.js on lines 404..409
    src/runtime/test_case_runner_spec.js on lines 567..572

    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.callCount(1)
            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 65..70
    src/runtime/test_case_runner_spec.js on lines 118..123
    src/runtime/test_case_runner_spec.js on lines 190..195
    src/runtime/test_case_runner_spec.js on lines 272..277
    src/runtime/test_case_runner_spec.js on lines 339..344
    src/runtime/test_case_runner_spec.js on lines 481..486
    src/runtime/test_case_runner_spec.js on lines 567..572

    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.callCount(1)
            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 118..123
    src/runtime/test_case_runner_spec.js on lines 190..195
    src/runtime/test_case_runner_spec.js on lines 272..277
    src/runtime/test_case_runner_spec.js on lines 339..344
    src/runtime/test_case_runner_spec.js on lines 404..409
    src/runtime/test_case_runner_spec.js on lines 481..486
    src/runtime/test_case_runner_spec.js on lines 567..572

    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.callCount(1)
            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 65..70
    src/runtime/test_case_runner_spec.js on lines 190..195
    src/runtime/test_case_runner_spec.js on lines 272..277
    src/runtime/test_case_runner_spec.js on lines 339..344
    src/runtime/test_case_runner_spec.js on lines 404..409
    src/runtime/test_case_runner_spec.js on lines 481..486
    src/runtime/test_case_runner_spec.js on lines 567..572

    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 57..63

    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