Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make 'rake test' delegate to npm.

  • Loading branch information...
commit a25e28737ef61195c6dd13da77364fd8f600fb58 1 parent 14496cb
Rico Sta. Cruz rstacruz authored
Showing with 1 addition and 32 deletions.
  1. +1 −32 Rakefile
33 Rakefile
View
@@ -61,36 +61,5 @@ namespace :js do
end
task :test do
- stdin, stdout, stderr = Open3.popen3 \
- './node_modules/mocha/bin/mocha ./spec/*_spec.coffee --compilers coffee:coffee-script -R spec -c'
-
- puts stdout_array = stdout.readlines
- puts stderr_array = stderr.readlines
-
- stdout_strings = stdout_array.to_s
- stderr_strings = stderr_array.to_s
-
- if stderr_strings and
- error_match = stderr_strings.match(/(\d+) of (\d+) (test[s]?) failed/)
-
- failed_count, total_count, tests_failed_str = error_match.captures
-
- message = "#{failed_count} of #{total_count} #{tests_failed_str} failed"
-
- elsif stdout_strings_match = stdout_strings.match(/(\d+) (test[s]?) complete/)
- complete_count, tests_complete_str = stdout_strings_match.captures
-
- if pending_matches = stdout_strings.match(/(\d+) test[s]? pending/)
- pending_count, tests_pending_str = pending_matches.captures
- end
-
- message = "#{complete_count} #{tests_complete_str} complete"
- message += ", #{pending_count} #{tests_pending_str} pending" if pending_count
-
- else
- message = 'Something wrong, check console output.'
- end
-
- `bundle exec terminal-notifier -message '#{message}' -title 'Test results' -remove TEST_RESULTS -group TEST_RESULTS`
- Talks.say message, detach: true
+ system "npm test"
end
Please sign in to comment.
Something went wrong with that request. Please try again.