dgarlitt / karma-nyan-reporter

Nyan Cat style reporter based on the Mocha version
MIT License
169 stars 19 forks source link

Simple 'options' logic + "suppressStackTrace" option #7

Closed ashwell closed 9 years ago

ashwell commented 9 years ago

The way my testing workflow is set up I don't need to see the full stack trace of errors in the console (the stack traces are reachable elsewhere). Since I wanted to give my developers a little treat and use karma-nyan-reporter in the console I added an option to suppress the stack trace all together.

Since there was no option system set up I added a little bit of functionality to create a defaultOptions object and merge that with any incoming options from the "config" object passed in by Karma.

The reasoning for using a function and returning a new instance of "defaultOptions" is in the unlikely event that two NyanCat instances are created, their options objects won't conflict.

If you have any suggestions or changes or just don't like this/me please let me know.

dgarlitt commented 9 years ago

@Ashwell Thanks for the pull request! This is a great addition. I would be happy to merge it in. Could you squash your commits into a single commit with the message formatted following this guide?

dgarlitt commented 9 years ago

@Ashwell - I squashed the commit messages and merged in via local branch. Your change is in release v0.0.51. Note that I changed the option to suppressErrorReport. Thanks again for the contribution!

ashwell commented 9 years ago

I was just looking to get to this today, you beat me to it @dgarlitt! I'm glad I could be of service!