libnotify support for expresso

Warning: Linux, Terminal, vim and Continuous Testing ahead.  Not a fan?  Did you know Continuous testing is coming to Visual Studio vNext?  Yeah – it’s that good an idea!  Go get NCrunch for VS 2010 or the preview of VS 2011.

I recently switched from vows to expresso for my nodejs unit testing.  I prefer the BDD format of vows, but I was having trouble getting them to work nicely with soda and selenium.  Vows has watch support for continuous testing which I love, but it didn’t have libnotify support.  I need this, because I run my watchers like Guard, node-dev, and such on another workspace.


Without the notifications from libnotify I would have to switch back and for to see the terminal output of the watcher process.  Kills my flow. 

Expresso doesn’t have watch support so I added it to my Guardfile:


That should run expresso for all of my fast tests whenever anything changes.  Cool!  Unfortunately, guard doesn’t expand wildcards like the terminal and expresso relies on this to test folders recursively.  I’ve pushed a –d –directory option to my fork if you want it.  I’ll submit a pull request later, but don’t hold your breath.

Cool my fast tests are running when I change things in my app.  Now it’s time for a results notification.  Unfortunately, expresso only has Growl support, but not libnotify… foiled again!  No fear, christiaan has a pull request pending just for this reason.  But how do I get it? 


Not really.  First I fork expresso


Then I add christiaans fork to my remotes

git remote add christiaan git://

Then I pull in his commits

git fetch christiaan 

Push the result up to my repo for nice people like you.

git push origin master

OK it’s in there, but how do I USE it?  Well npm (node package manager) has support for a smooth dev experience like this.

I can jump into my expresso fork repo and use npm link:

cd ~/projects/expresso

npm link

npm link will create a symlink in my global package source which I can then use anywhere.  I could also npm link them into any local projects, but this works for me at the moment.  I might depend on them locally later, but we’ll see.

Now when I change things in my project, guard notices and tells expresso to do it’s thing and I get a notification as to how things went.  Pretty nice.