Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
Last active December 17, 2015 09:58
Show Gist options
  • Save jedi4ever/5590952 to your computer and use it in GitHub Desktop.
Save jedi4ever/5590952 to your computer and use it in GitHub Desktop.
growl - nodejs - mocha
Get free version of growl - http://www.macupdate.com/app/mac/41038/growl-fork
From notes on - <https://github.com/visionmedia/node-growl>
$ sudo gem install terminal-notifier
$ npm install growl
$ ./node_modules/mocha/bin/mocha --require test/common.js -G
Simple guard-nodejs like :
- <https://coderwall.com/p/cz4fdw>
var watch = require('nodewatch');
var util = require('util');
var exec = require('child_process').exec;
watch
.add("./test", true)
.add("./src", true)
.onChange(function(file, prev, curr, action) {
exec("make test", function(error, stdout, stderr) {
util.print('stdout: ' + stdout);
util.print('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment