gruntjs/grunt-contrib-jasmine — pull request #117 by jonathanberney (2014-02-10 22:50:20+00:00)
Title: Provides a more consistent spec pass/failure display

I've set up my Eclipse IDE to run Grunt with the external tool builder. When Grunt runs, it outputs log messages to Eclipse's Console view. By default, this view does not support color, so I installed this Eclipse plugin which enhances the Console view to show ANSI colors:
http://mihai-nita.net/2013/06/03/eclipse-plugin-ansi-in-console/

The current output behavior for specs seems to be:
1. Write out that the spec is running, followed by ellipses [Line 210].
2. If stdout supports clearLine, clear the line and log the result with chalk [Lines 246-254].
3. Else if the line is clean, log the result without chalk [Lines 257-259].
4. Else log the result in grey but again with a colorless symbol [Lines 260-265].

Eclipse's Console view does not support process.stdout.clearLine. As a result, we fall back to a color-less pass/fail spec display.

What we should do is:
1. (Only) if stdout supports clearLine, write out that the spec is running, followed by ellipses [Line 210].
2. If stdout supports clearLine, clear the line [Lines 249-253].
3. Log the result with chalk [Lines 255-259].

This results in a consistent final output, regardless of whether or not the process's stdout supports clearLine.