提交 fb8908d9 编写于 作者: T Tim Zallmann 提交者: Stan Hu

Removed also the in the meanwhile introduced rake task

上级 c5752955
unless Rails.env.production?
namespace :karma do
desc 'GitLab | Karma | Generate fixtures for JavaScript tests'
task fixtures: ['karma:copy_emojis_from_public_folder', 'karma:rspec_fixtures']
task fixtures: ['karma:rspec_fixtures']
desc 'GitLab | Karma | Generate fixtures using RSpec'
RSpec::Core::RakeTask.new(:rspec_fixtures, [:pattern]) do |t, args|
......@@ -11,14 +11,6 @@ unless Rails.env.production?
t.rspec_opts = '--format documentation'
end
desc 'GitLab | Karma | Copy emojis file'
task :copy_emojis_from_public_folder do
# Copying the emojis.json from the public folder
fixture_file_name = Rails.root.join('spec/javascripts/fixtures/emojis/emojis.json')
FileUtils.mkdir_p(File.dirname(fixture_file_name))
FileUtils.cp(Rails.root.join('public/-/emojis/1/emojis.json'), fixture_file_name)
end
desc 'GitLab | Karma | Run JavaScript tests'
task tests: ['yarn:check'] do
sh "yarn run karma" do |ok, res|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册