Skip to content

Duplicate Console Log Entries #11

@jonnyreeves

Description

@jonnyreeves

Pretty sure this is not a bug with this reporter and may be a symptom of the way Karma works internally, however I've noticed that I get duplicate console log entries when using this reporter in conjunction with another (eg: dots).

When my karama.conf file contains reporters: [ 'dots', 'html' ], I get the following output:

15 09 2015 09:23:45.747:WARN [karma]: No captured browser, open http://localhost:9876/
15 09 2015 09:23:45.755:INFO [karma]: Karma v0.13.9 server started at http://localhost:9876/
15 09 2015 09:23:45.760:INFO [launcher]: Starting browser PhantomJS
15 09 2015 09:23:46.587:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket cXsysri-cZ0oXvP0AAAA with id 16285519
PhantomJS 1.9.8 (Mac OS X 0.0.0) CheckboxWithLabel changes the text after click FAILED
    Expected 'Off' to equal 'Of'.
        at /MyProject/test/components/CheckboxWithLabelSpec.js:71 <- webpack:///test/components/CheckboxWithLabelSpec.js:17:4
PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 1 of 1 (1 FAILED) (0 secs / 0.013 secs)

PhantomJS 1.9.8 (Mac OS X 0.0.0) CheckboxWithLabel changes the text after click FAILED
    Expected 'Off' to equal 'Of'.
        at /MyProject/test/components/CheckboxWithLabelSpec.js PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 1 of 1 (1 FAILED) ERROR (0.043 secs / 0.013 secs)

Changing my karma.conf to use reporters: [ 'dots' ] gives me the desired output:

15 09 2015 09:27:55.032:WARN [karma]: No captured browser, open http://localhost:9876/
15 09 2015 09:27:55.040:INFO [karma]: Karma v0.13.9 server started at http://localhost:9876/
15 09 2015 09:27:55.044:INFO [launcher]: Starting browser PhantomJS
15 09 2015 09:27:55.832:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket On7tT1Wy8n4PlbywAAAA with id 30935242
PhantomJS 1.9.8 (Mac OS X 0.0.0) CheckboxWithLabel changes the text after click FAILED
    Expected 'Off' to equal 'Of'.
        at /MyProject/test/components/CheckboxWithLabelSpec.js:71 <- webpack:///test/components/CheckboxWithLabelSpec.js:17:4
PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 1 of 1 (1 FAILED) ERROR (0.041 secs / 0.011 secs

Any thoughts on how to avoid this duplication?

Activity

valuka

valuka commented on Oct 24, 2016

@valuka

+1 I have the same issue and would like to fix it.

lawrenceching

lawrenceching commented on Nov 2, 2016

@lawrenceching

Any update?
I have other reporter to print better console log
Is it possible to disable kjhtml to print spec log in console?

tonivj5

tonivj5 commented on Aug 3, 2017

@tonivj5

any news on this?

cburgmer

cburgmer commented on Jan 3, 2018

@cburgmer

My local solution was to remove kjhtml from the default list of reporters and only supply it via the command line (--reporters kjhtml) when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cburgmer@jonnyreeves@valuka@tonivj5@lawrenceching

        Issue actions

          Duplicate Console Log Entries · Issue #11 · taras42/karma-jasmine-html-reporter