Last Updated: February 25, 2016
· modocache

Workaround for broken `jasmine-node --autotest` on OS X


According to this issue on the jasmine-node repo on Github, autotesting is broken on OS X. I encountered issues where autotesting would exit whenever a file was modified. The proposed workaround didn't work for me, but this did:

$ gem install watchr

Then create a new file:

# $PROJECTDIR/autotest.rb
watch('.*') { |match_data_object| system('jasmine-node .') }

You can run tests like so:

$ watchr autotest.rb