brisket/brisket

View on GitHub

Showing 240 of 269 total issues

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

            it("hash links", function() {
                $link = $fixture.find("a[href^='#']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("fully qualified link", function() {
                $link = $fixture.find("a[href^='http']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("javascript code link", function() {
                $link = $fixture.find("a[href^='javascript']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348

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

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

            it("absolute path link", function() {
                $link = $fixture.find("a[href^='/']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("fully qualified link", function() {
                $link = $fixture.find("a[href^='http']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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("joins appRoot and path", function() {
        expect(pathJoin("/appRoot", "path")).toBe("/appRoot/path");
        expect(pathJoin("/appRoot/", "path")).toBe("/appRoot/path");
        expect(pathJoin("/appRoot/", "/path")).toBe("/appRoot/path");
    });
Severity: Major
Found in spec/server/util/pathJoinSpec.js and 1 other location - About 1 hr to fix
spec/server/util/pathJoinSpec.js on lines 6..10

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

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("joins domain and path", function() {
        expect(pathJoin("http://www.example.com", "path")).toBe("http://www.example.com/path");
        expect(pathJoin("http://www.example.com/", "path")).toBe("http://www.example.com/path");
        expect(pathJoin("http://www.example.com/", "/path")).toBe("http://www.example.com/path");
    });
Severity: Major
Found in spec/server/util/pathJoinSpec.js and 1 other location - About 1 hr to fix
spec/server/util/pathJoinSpec.js on lines 12..16

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

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

        beforeEach(function() {
            restOfCodeInTheHandler = jasmine.createSpy("rest of code in the handler");

            originalHandler = function(layout, request, response) {
                response.redirect("go/somewhere");
Severity: Major
Found in spec/server/ServerRenderingWorkflowSpec.js and 1 other location - About 1 hr to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 275..285

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

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

        beforeEach(function() {
            restOfCodeInTheHandler = jasmine.createSpy("rest of code in the handler");

            originalHandler = function(layout, request, response) {
                response.redirect("go/somewhere");
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 1 hr to fix
spec/server/ServerRenderingWorkflowSpec.js on lines 149..159

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

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("renders title when title tag is on multiple lines", function() {
                layout.el.innerHTML = "<html><head><title>\n</title></head><body></body></html>";
                layout.defaultTitle = "Default Title";
                html = ServerRenderer.render(layout, view, null, mockServerRequest);

Severity: Major
Found in spec/server/ServerRendererSpec.js and 1 other location - About 1 hr to fix
spec/server/ServerRendererSpec.js on lines 344..350

Duplicated Code

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

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

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

Tuning

This issue has a mass of 72.

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

    function givenAjaxCallWillSucceed() {
        spyOn(ClientTestable, "BackboneNativeAjax").and.callFake(function(ajaxConfig) {
            if (ajaxConfig.success) {
                ajaxConfig.success();
            }
Severity: Major
Found in spec/client/client/ClientAjaxSpec.js and 1 other location - About 1 hr to fix
spec/client/client/ClientAjaxSpec.js on lines 206..216

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

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

    function givenApiRequestWillSucceed() {
        spyOn(Testable, "requestPromise").and.returnValue(Promise.resolve({
            statusCode: 200,
            headers: {
                "content-type": "application/json"
Severity: Major
Found in spec/server/ServerAjaxSpec.js and 1 other location - About 1 hr to fix
spec/server/ServerAjaxSpec.js on lines 322..332

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

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

    function givenApiRequestWillFail() {
        spyOn(Testable, "requestPromise").and.returnValue(Promise.resolve({
            statusCode: 500,
            headers: {
                "content-type": "application/json"
Severity: Major
Found in spec/server/ServerAjaxSpec.js and 1 other location - About 1 hr to fix
spec/server/ServerAjaxSpec.js on lines 310..320

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

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

    function givenAjaxCallWillFail() {
        spyOn(ClientTestable, "BackboneNativeAjax").and.callFake(function(ajaxConfig) {
            if (ajaxConfig.error) {
                ajaxConfig.error();
            }
Severity: Major
Found in spec/client/client/ClientAjaxSpec.js and 1 other location - About 1 hr to fix
spec/client/client/ClientAjaxSpec.js on lines 194..204

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

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("renders title when title tag is on multiple lines", function() {
                layout.el.innerHTML = "<html><head><title class='klass'>\n</title></head><body></body></html>";
                layout.defaultTitle = "Default Title";
                html = ServerRenderer.render(layout, view, null, mockServerRequest);

Severity: Major
Found in spec/server/ServerRendererSpec.js and 1 other location - About 1 hr to fix
spec/server/ServerRendererSpec.js on lines 300..306

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

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

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

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

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

Refactorings

Further Reading

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

    it("forwards api requests when config does NOT have proxy", function() {
        givenApiConfigDoesNOTHaveProxy();
        givenApiConfigHasTimeout();
        givenApiResponseWillSucceed();
        whenMiddlewareForwardsRequest();
Severity: Major
Found in spec/server/ForwardClientRequestSpec.js and 3 other locations - About 1 hr to fix
spec/server/ForwardClientRequestSpec.js on lines 36..45
spec/server/ForwardClientRequestSpec.js on lines 47..56
spec/server/ForwardClientRequestSpec.js on lines 69..78

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

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

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

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

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

Refactorings

Further Reading

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

    it("forwards api requests", function() {
        givenApiConfigHasProxy();
        givenApiConfigHasTimeout();
        givenApiResponseWillSucceed();
        whenMiddlewareForwardsRequest();
Severity: Major
Found in spec/server/ForwardClientRequestSpec.js and 3 other locations - About 1 hr to fix
spec/server/ForwardClientRequestSpec.js on lines 47..56
spec/server/ForwardClientRequestSpec.js on lines 58..67
spec/server/ForwardClientRequestSpec.js on lines 69..78

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

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("when one layout instance is NOT the same type as another instance", function() {

            beforeEach(function() {
                layout = new Layout1();
            });
Severity: Major
Found in spec/server/viewing/LayoutSpec.js and 1 other location - About 1 hr to fix
spec/server/viewing/LayoutSpec.js on lines 113..123

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

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("when a layout instance is the same type as another instance", function() {

            beforeEach(function() {
                layout = new Layout1();
            });
Severity: Major
Found in spec/server/viewing/LayoutSpec.js and 1 other location - About 1 hr to fix
spec/server/viewing/LayoutSpec.js on lines 125..135

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

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

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

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

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

Refactorings

Further Reading

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

            it("should NOT render", function(done) {
                callAugmentedRouterHandler()
                    .then(function() {
                        expect(ClientRenderer.render).not.toHaveBeenCalled();
                    })
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 1 hr to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 799..806

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

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