Created
June 4, 2014 16:36
-
-
Save arturopie/99f6dfc97a74bd37d0f4 to your computer and use it in GitHub Desktop.
Observr configuration to run karma tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup: gem install observr | |
# usage: | |
# observr run_js_specs.rb | |
watch('spec/.*_spec.js') { |_| run_all_tests } | |
watch('client/.*.js') { |_| run_all_tests } | |
def run_all_tests | |
puts "RUNNING ALL TESTS" | |
system 'xvfb-run --auto-servernum node_modules/karma/bin/karma start karma.amd.conf.js --single-run' | |
end | |
Signal.trap('QUIT') { run_all_tests } | |
Signal.trap('INT') { abort('\n') } | |
run_all_tests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment