webdriverio/wdio-jasmine-framework

View on GitHub

Showing 146 of 146 total issues

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

    afterSuite: (...args) => {
        global._wdio.afterSuite = {
            wasExecuted: true,
            start: new Date().getTime(),
            args
Severity: Major
Found in test/fixtures/hooks.using.native.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.native.promises.js on lines 8..21
test/fixtures/hooks.using.native.promises.js on lines 22..35
test/fixtures/hooks.using.native.promises.js on lines 36..49
test/fixtures/hooks.using.native.promises.js on lines 50..63
test/fixtures/hooks.using.native.promises.js on lines 64..77
test/fixtures/hooks.using.native.promises.js on lines 78..91
test/fixtures/hooks.using.native.promises.js on lines 92..105
test/fixtures/hooks.using.native.promises.js on lines 106..119
test/fixtures/hooks.using.native.promises.js on lines 134..147

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

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

    beforeCommand: (...args) => {
        global._wdio.beforeCommand = {
            wasExecuted: true,
            start: new Date().getTime(),
            args
Severity: Major
Found in test/fixtures/hooks.using.native.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.native.promises.js on lines 8..21
test/fixtures/hooks.using.native.promises.js on lines 22..35
test/fixtures/hooks.using.native.promises.js on lines 36..49
test/fixtures/hooks.using.native.promises.js on lines 50..63
test/fixtures/hooks.using.native.promises.js on lines 64..77
test/fixtures/hooks.using.native.promises.js on lines 92..105
test/fixtures/hooks.using.native.promises.js on lines 106..119
test/fixtures/hooks.using.native.promises.js on lines 120..133
test/fixtures/hooks.using.native.promises.js on lines 134..147

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

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

    afterCommand: (...args) => {
        global._wdio.afterCommand = {
            wasExecuted: true,
            start: new Date().getTime(),
            args
Severity: Major
Found in test/fixtures/hooks.using.native.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.native.promises.js on lines 8..21
test/fixtures/hooks.using.native.promises.js on lines 22..35
test/fixtures/hooks.using.native.promises.js on lines 36..49
test/fixtures/hooks.using.native.promises.js on lines 50..63
test/fixtures/hooks.using.native.promises.js on lines 64..77
test/fixtures/hooks.using.native.promises.js on lines 78..91
test/fixtures/hooks.using.native.promises.js on lines 106..119
test/fixtures/hooks.using.native.promises.js on lines 120..133
test/fixtures/hooks.using.native.promises.js on lines 134..147

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

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

    before: (...args) => {
        global.___wdio.before.start = new Date().getTime()
        const defer = q.defer()
        setTimeout(() => {
            global.___wdio.before.end = new Date().getTime()
Severity: Major
Found in test/fixtures/hooks.using.q.promises.js and 11 other locations - About 4 hrs to fix
test/fixtures/hooks.using.q.promises.js on lines 27..35
test/fixtures/hooks.using.q.promises.js on lines 45..53
test/fixtures/hooks.using.q.promises.js on lines 54..62
test/fixtures/hooks.using.q.promises.js on lines 63..71
test/fixtures/hooks.using.q.promises.js on lines 72..80
test/fixtures/hooks.using.q.promises.js on lines 81..89
test/fixtures/hooks.using.q.promises.js on lines 90..98
test/fixtures/hooks.using.q.promises.js on lines 99..107
test/fixtures/hooks.using.q.promises.js on lines 108..116
test/fixtures/hooks.using.q.promises.js on lines 117..125
test/fixtures/hooks.using.q.promises.js on lines 126..134

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

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

    afterHook: (...args) => {
        global._wdio.afterHook = {
            wasExecuted: true,
            start: new Date().getTime(),
            args
Severity: Major
Found in test/fixtures/hooks.using.native.promises.js and 9 other locations - About 4 hrs to fix
test/fixtures/hooks.using.native.promises.js on lines 8..21
test/fixtures/hooks.using.native.promises.js on lines 22..35
test/fixtures/hooks.using.native.promises.js on lines 36..49
test/fixtures/hooks.using.native.promises.js on lines 64..77
test/fixtures/hooks.using.native.promises.js on lines 78..91
test/fixtures/hooks.using.native.promises.js on lines 92..105
test/fixtures/hooks.using.native.promises.js on lines 106..119
test/fixtures/hooks.using.native.promises.js on lines 120..133
test/fixtures/hooks.using.native.promises.js on lines 134..147

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

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

    onPrepare: (...args) => {
        global.___wdio.onPrepare.start = new Date().getTime()
        const defer = q.defer()
        setTimeout(() => {
            global.___wdio.onPrepare.end = new Date().getTime()
Severity: Major
Found in test/fixtures/hooks.using.q.promises.js and 11 other locations - About 4 hrs to fix
test/fixtures/hooks.using.q.promises.js on lines 36..44
test/fixtures/hooks.using.q.promises.js on lines 45..53
test/fixtures/hooks.using.q.promises.js on lines 54..62
test/fixtures/hooks.using.q.promises.js on lines 63..71
test/fixtures/hooks.using.q.promises.js on lines 72..80
test/fixtures/hooks.using.q.promises.js on lines 81..89
test/fixtures/hooks.using.q.promises.js on lines 90..98
test/fixtures/hooks.using.q.promises.js on lines 99..107
test/fixtures/hooks.using.q.promises.js on lines 108..116
test/fixtures/hooks.using.q.promises.js on lines 117..125
test/fixtures/hooks.using.q.promises.js on lines 126..134

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

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

    beforeCommand: (...args) => {
        global.___wdio.beforeCommand.start = new Date().getTime()
        const defer = q.defer()
        setTimeout(() => {
            global.___wdio.beforeCommand.end = new Date().getTime()
Severity: Major
Found in test/fixtures/hooks.using.q.promises.js and 11 other locations - About 4 hrs to fix
test/fixtures/hooks.using.q.promises.js on lines 27..35
test/fixtures/hooks.using.q.promises.js on lines 36..44
test/fixtures/hooks.using.q.promises.js on lines 45..53
test/fixtures/hooks.using.q.promises.js on lines 54..62
test/fixtures/hooks.using.q.promises.js on lines 63..71
test/fixtures/hooks.using.q.promises.js on lines 72..80
test/fixtures/hooks.using.q.promises.js on lines 90..98
test/fixtures/hooks.using.q.promises.js on lines 99..107
test/fixtures/hooks.using.q.promises.js on lines 108..116
test/fixtures/hooks.using.q.promises.js on lines 117..125
test/fixtures/hooks.using.q.promises.js on lines 126..134

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

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

    afterCommand: (...args) => {
        global.___wdio.afterCommand.start = new Date().getTime()
        const defer = q.defer()
        setTimeout(() => {
            global.___wdio.afterCommand.end = new Date().getTime()
Severity: Major
Found in test/fixtures/hooks.using.q.promises.js and 11 other locations - About 4 hrs to fix
test/fixtures/hooks.using.q.promises.js on lines 27..35
test/fixtures/hooks.using.q.promises.js on lines 36..44
test/fixtures/hooks.using.q.promises.js on lines 45..53
test/fixtures/hooks.using.q.promises.js on lines 54..62
test/fixtures/hooks.using.q.promises.js on lines 63..71
test/fixtures/hooks.using.q.promises.js on lines 72..80
test/fixtures/hooks.using.q.promises.js on lines 81..89
test/fixtures/hooks.using.q.promises.js on lines 99..107
test/fixtures/hooks.using.q.promises.js on lines 108..116
test/fixtures/hooks.using.q.promises.js on lines 117..125
test/fixtures/hooks.using.q.promises.js on lines 126..134

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

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

    afterSuite: (...args) => {
        global.___wdio.afterSuite.start = new Date().getTime()
        const defer = q.defer()
        setTimeout(() => {
            global.___wdio.afterSuite.end = new Date().getTime()
Severity: Major
Found in test/fixtures/hooks.using.q.promises.js and 11 other locations - About 4 hrs to fix
test/fixtures/hooks.using.q.promises.js on lines 27..35
test/fixtures/hooks.using.q.promises.js on lines 36..44
test/fixtures/hooks.using.q.promises.js on lines 45..53
test/fixtures/hooks.using.q.promises.js on lines 54..62
test/fixtures/hooks.using.q.promises.js on lines 63..71
test/fixtures/hooks.using.q.promises.js on lines 72..80
test/fixtures/hooks.using.q.promises.js on lines 81..89
test/fixtures/hooks.using.q.promises.js on lines 90..98
test/fixtures/hooks.using.q.promises.js on lines 99..107
test/fixtures/hooks.using.q.promises.js on lines 117..125
test/fixtures/hooks.using.q.promises.js on lines 126..134

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

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

    describe('nested', () => {
        it('bar', () => {
            const start = new Date().getTime()
            return browser.command().then((result) => {
                expect(result).toBe('foo')
Severity: Major
Found in test/fixtures/tests.async.spec.js and 1 other location - About 3 hrs to fix
test/fixtures/tests.async.promise.spec.js on lines 3..11

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

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

describe('sample test', () => {
    it('foo', () => {
        const start = new Date().getTime()
        return browser.command().then((result) => {
            expect(result).toBe('foo')
Severity: Major
Found in test/fixtures/tests.async.promise.spec.js and 1 other location - About 3 hrs to fix
test/fixtures/tests.async.spec.js on lines 28..36

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

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

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

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

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

Refactorings

Further Reading

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

    describe('run flaky beforeEach hooks', () => {
        beforeAll(() => {
            retryCnt = 2
        })

Severity: Major
Found in test/fixtures/tests.retry.sync.spec.js and 3 other locations - About 3 hrs to fix
test/fixtures/tests.retry.sync.spec.js on lines 4..18
test/fixtures/tests.retry.sync.spec.js on lines 68..82
test/fixtures/tests.retry.sync.spec.js on lines 84..98

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

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

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

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

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

Refactorings

Further Reading

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

    describe('run flaky afterAll hooks', () => {
        beforeAll(() => {
            retryCnt = 2
        })

Severity: Major
Found in test/fixtures/tests.retry.sync.spec.js and 3 other locations - About 3 hrs to fix
test/fixtures/tests.retry.sync.spec.js on lines 4..18
test/fixtures/tests.retry.sync.spec.js on lines 20..34
test/fixtures/tests.retry.sync.spec.js on lines 68..82

Duplicated Code

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

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

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

Tuning

This issue has a mass of 104.

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

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

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

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

Refactorings

Further Reading

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

    describe('run flaky afterEach hooks', () => {
        beforeAll(() => {
            retryCnt = 2
        })

Severity: Major
Found in test/fixtures/tests.retry.sync.spec.js and 3 other locations - About 3 hrs to fix
test/fixtures/tests.retry.sync.spec.js on lines 4..18
test/fixtures/tests.retry.sync.spec.js on lines 20..34
test/fixtures/tests.retry.sync.spec.js on lines 84..98

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

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

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

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

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

Refactorings

Further Reading

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

    describe('run flaky beforeAll hooks', () => {
        beforeAll(() => {
            retryCnt = 2
        })

Severity: Major
Found in test/fixtures/tests.retry.sync.spec.js and 3 other locations - About 3 hrs to fix
test/fixtures/tests.retry.sync.spec.js on lines 20..34
test/fixtures/tests.retry.sync.spec.js on lines 68..82
test/fixtures/tests.retry.sync.spec.js on lines 84..98

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

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

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

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

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

Refactorings

Further Reading

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

    beforeEach(function async () {
        const start = new Date().getTime()
        return browser.command().then((result) => {
            result.should.be.equal('foo')
            global._______wdio.beforeEachAsync = new Date().getTime() - start
Severity: Major
Found in test/fixtures/tests.sync.async.spec.js and 2 other locations - About 3 hrs to fix
test/fixtures/tests.sync.async.spec.js on lines 52..58
test/fixtures/tests.sync.async.spec.js on lines 66..72

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

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

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

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

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

Refactorings

Further Reading

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

    afterEach(function async () {
        const start = new Date().getTime()
        return browser.command().then((result) => {
            result.should.be.equal('foo')
            global._______wdio.afterEachAsync = new Date().getTime() - start
Severity: Major
Found in test/fixtures/tests.sync.async.spec.js and 2 other locations - About 3 hrs to fix
test/fixtures/tests.sync.async.spec.js on lines 24..30
test/fixtures/tests.sync.async.spec.js on lines 66..72

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

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

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

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

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

Refactorings

Further Reading

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

    afterAll(function async () {
        const start = new Date().getTime()
        return browser.command().then((result) => {
            result.should.be.equal('foo')
            global._______wdio.afterAsync = new Date().getTime() - start
Severity: Major
Found in test/fixtures/tests.sync.async.spec.js and 2 other locations - About 3 hrs to fix
test/fixtures/tests.sync.async.spec.js on lines 24..30
test/fixtures/tests.sync.async.spec.js on lines 52..58

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

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

    describe('should support xit blocks', () => {
        it('should not fail as all test blocks are marked as pending', async () => {
            global.browser = new WebdriverIO()
            global.browser.options = { }
            const adapter = new JasmineAdapter(0, {}, xitSpecs, {});
Severity: Major
Found in test/tests.spec.js and 1 other location - About 3 hrs to fix
test/tests.spec.js on lines 153..160

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

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

    describe('should support xdescribe blocks', () => {
        it('should not fail as all suite blocks are marked as pending', async () => {
            global.browser = new WebdriverIO()
            global.browser.options = { }
            const adapter = new JasmineAdapter(0, {}, xdescribeSpecs, {});
Severity: Major
Found in test/tests.spec.js and 1 other location - About 3 hrs to fix
test/tests.spec.js on lines 144..151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 101.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language