mhevery/jasmine-node — pull request #105 by adomokos (2011-12-19 05:08:14+00:00)
Title: Separating out the TerminalVerboseReporter - following SRP

Miško,

Here is the defect I'd like to fix with this pull request: I used nested "describe" blocks in a spec and the command line "--verbose" option reported "it undefined" when I executed the spec. Coloring also wasn't working in the "--verbose" execution mode.

I started refactoring the TerminalReporter based on the jasmine-html.js file I found in the jasmine source code. Most of the ideas I used are from there. I use the TerminalReporter as a default and the new object TerminalVerboseReporter is inheriting + altering the jasmine event handlers.

Please note that I call the verbose reporter from the index.js based on the parsed command line argument, this way I don't need to pass the "isVerbose" flag in the config.

I also ignored the Team City specific conditionals since a Team City reporter is already handled from index.js.

There were two other methods that I am not passing into the initializer function through the config object: the stackFilter_ and the onComplete_. Please check out this change and let me know if those functions are needed.

I started adding specs around this new reporter. (Another good thing about this refactored code is that it's easier to test.)

Let me know if I need to change anything.

Thanks!