blob: fa3f880515916995a3f60365e5f6c03690664cc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
unless Rails.env.production?
namespace :karma do
# alias exists for legacy reasons
desc 'GitLab | Karma | Generate fixtures for JavaScript tests'
task fixtures: ['frontend:fixtures']
desc 'GitLab | Karma | Run JavaScript tests'
task tests: ['yarn:check'] do
sh "yarn run karma" do |ok, res|
abort('rake karma:tests failed') unless ok
end
end
end
desc 'GitLab | Karma | Shortcut for karma:fixtures and karma:tests'
task karma: ['karma:fixtures', 'karma:tests']
end
|