Revert "FEATURE: Introduce theme/component QUnit tests (#12517)" (#12632)

This reverts commit a53d8d3e61 and 105634435f.

Reverted because the change broke some components. Will be added back in a few days.
This commit is contained in:
Osama Sayegh
2021-04-07 17:45:49 +03:00
committed by GitHub
parent 68a032a734
commit 2b9ab3a0d9
24 changed files with 165 additions and 419 deletions

View File

@ -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

View File

@ -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