taras42 / karma-jasmine-html-reporter

A Karma plugin. Dynamically displays tests results at debug.html page
MIT License
44 stars 17 forks source link

Duplicate Console Log Entries #11

Open jonnyreeves opened 9 years ago

jonnyreeves commented 9 years ago

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?

valuka commented 7 years ago

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

lawrenceching commented 7 years ago

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

tonivj5 commented 7 years ago

any news on this?

cburgmer commented 6 years ago

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.