karma-runner / maven-karma-plugin

Maven plugin for running tests using Karma.
Apache License 2.0
45 stars 26 forks source link

Console color coded message from karma #11

Closed fbengrid closed 11 years ago

fbengrid commented 11 years ago

In the current implementation of the maven plugin, color coded messages coming from karma (ansi messages) are not properly handled which causes invalid charater being produced on the console. The change in this implementation sort this issue via the use of the jansi library. Regards, Farid

wokier commented 11 years ago

Please allow a plugin configuration to enable the --no-colors flag for the cases the console does not support it

fbengrid commented 11 years ago

yes i was thinking about it today, i should have it done later on today.

wokier commented 11 years ago

I have found this plugin thanks to cloudbees support. https://wiki.jenkins-ci.org/display/JENKINS/AnsiColor+Plugin It just put color where i was unable to.

fbengrid commented 11 years ago

tks for the link, that might come handy when we integrate our karma tests with our jenkins. On a different i did push the changes with the colors attribute it to enable/disable it. have you missed it ?

wokier commented 11 years ago

Great

On 11 July 2013 21:54, fbengrid notifications@github.com wrote:

tks for the link, that might come handy when we integrate our karma tests with our jenkins. On a different i did push the changes with the colors attribute it to enable/disable it. have you missed it ?

— Reply to this email directly or view it on GitHubhttps://github.com/karma-runner/maven-karma-plugin/pull/11#issuecomment-20837695 .

Francois Wauquier http://about.me/francoisWauquier

kelveden commented 11 years ago

Sorry for the delay - a brief scan of the pull request looks good. I'll get it merged in and pushed to Maven Central over the weekend.

kelveden commented 11 years ago

Note commit 5c9faeaaf536f3fb00c17c15b5a86427776f552c - given the problems that you've experienced with the colour output I think it's best to disable it by default. People can always re-enable it in their pom if they need to.

fbengrid commented 11 years ago

tks for the merge. Regarding the color output switched off by default by the maven plugin, This might be a bit too intrusive. I would think letting the karma configuration file handle this default behavior should be better, so that the maven plugin does not conflict with the karma configuration in terms of default behavior.

kelveden commented 11 years ago

Yep sold, the idea of the plugin was always to delegate to Karma itself if a specific decision wasn't made in the Maven config. In any case, users with problems with the colour output will have to change their karma conf anyway. 51ada3ba69a0c72609b018de58e07067493527c0

fbengrid commented 11 years ago

great