diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-02-15 23:18:21 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-02-16 08:46:29 +0300 |
commit | e65298794725e5df22d7e1fdfee62fbc49c44857 (patch) | |
tree | 37b21e15e8d3c54e68ef9164835bd0951fdffed6 /lib/tasks/karma.rake | |
parent | b36542e1cbb90134435f5333c46dd0dc89bb468f (diff) |
ensure rake tasks produce helpful error messages for node dependency issues
Diffstat (limited to 'lib/tasks/karma.rake')
-rw-r--r-- | lib/tasks/karma.rake | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/tasks/karma.rake b/lib/tasks/karma.rake index 35cfed9dc75..40465ea3bf0 100644 --- a/lib/tasks/karma.rake +++ b/lib/tasks/karma.rake @@ -1,6 +1,4 @@ unless Rails.env.production? - Rake::Task['karma'].clear if Rake::Task.task_defined?('karma') - namespace :karma do desc 'GitLab | Karma | Generate fixtures for JavaScript tests' RSpec::Core::RakeTask.new(:fixtures) do |t| @@ -10,7 +8,7 @@ unless Rails.env.production? end desc 'GitLab | Karma | Run JavaScript tests' - task :tests do + task tests: ['yarn:check'] do sh "yarn run karma" do |ok, res| abort('rake karma:tests failed') unless ok end @@ -18,8 +16,5 @@ unless Rails.env.production? end desc 'GitLab | Karma | Shortcut for karma:fixtures and karma:tests' - task :karma do - Rake::Task['karma:fixtures'].invoke - Rake::Task['karma:tests'].invoke - end + task karma: ['karma:fixtures', 'karma:tests'] end |