Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Karma: System notifications when tests pass or fail

Currently, when using karma/testacular, I open up a command line windows and do karma start. I then generally work in vim, and if I'm working in fullscreen mode I have to tab back to the command window to see the test results when I make changes and save.

I'd like instead to get a system notification showing me if the results of the tests were SUCCESS or FAILURE, each time I save.

Since I work on both linux and windows, I'd like solutions for both cases. A vim plugin instead of a system notification would also be a fine solution, though I haven't been able to find any yet.

like image 267
Jonah Avatar asked May 29 '13 05:05

Jonah


2 Answers

Karma supports Growl/GNTP as a reporter, looks like this could work in Windows and Linux.

I did the following which worked on OSX:

  1. Installed Growl

  2. Installed growly

    npm install growly
    
  3. Added growl to karma.conf.js

    reporters = ['progress', 'growl'];
    
like image 62
meleyal Avatar answered Sep 25 '22 03:09

meleyal


Another option if you're using Mountain Lion and OSX Notifications and you don't want to install Growl is to just use the karma-osx-reporter plugin. Works beautifully!

like image 33
Brent Avatar answered Sep 24 '22 03:09

Brent