mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
This reverts commita53d8d3e61
and105634435f
. Reverted because the change broke some components. Will be added back in a few days.
This commit is contained in:
@ -61,7 +61,7 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|
|
||||
cmd = "node #{test_path}/run-qunit.js http://localhost:#{port}#{qunit_path}"
|
||||
options = { seed: (ENV["QUNIT_SEED"] || Random.new.seed), hidepassed: 1 }
|
||||
|
||||
%w{module filter qunit_skip_core qunit_single_plugin theme_name theme_url}.each do |arg|
|
||||
%w{module filter qunit_skip_core qunit_single_plugin}.each do |arg|
|
||||
options[arg] = ENV[arg.upcase] if ENV[arg.upcase].present?
|
||||
end
|
||||
|
||||
|
@ -96,24 +96,3 @@ task "themes:audit" => :environment do
|
||||
puts repo
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run QUnit tests of a theme/component"
|
||||
task "themes:qunit", :theme_name_or_url do |t, args|
|
||||
name_or_url = args[:theme_name_or_url]
|
||||
if name_or_url.blank?
|
||||
raise "A theme name or URL must be provided."
|
||||
end
|
||||
if name_or_url =~ /^(url|name)=(.+)/
|
||||
cmd = "THEME_#{Regexp.last_match(1).upcase}=#{Regexp.last_match(2)} "
|
||||
cmd += `which rake`.strip + " qunit:test"
|
||||
sh cmd
|
||||
else
|
||||
raise <<~MSG
|
||||
Cannot parse passed argument #{name_or_url.inspect}.
|
||||
Usage:
|
||||
`bundle exec rake themes:unit[url=<theme_url>]`
|
||||
OR
|
||||
`bundle exec rake themes:unit[name=<theme_name>]`
|
||||
MSG
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user