Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b7c7e62a44
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (14 sloc) 0.564 kb
# Call from command line with `watchr autotest.watchr`
# Automatically run tests when files change.
# I run this in the corner of my screen to let me know immediately
# if I make breaking changes (or syntax errors).
# It depends on ruby and the watchr gem -
# get it with `sudo gem install watchr`
# Idea from http://cjohansen.no/en/node_js/unit_testing_node_js_apps
def run_all_tests
print `clear`
puts "Tests run #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}"
puts `node runtests.js`
end
run_all_tests
watch("(tests|lib)(/.*)+.js") { |m| run_all_tests }
Jump to Line
Something went wrong with that request. Please try again.