DEV: Allow rake qunit filter to be used alongside parallel option (#18326)

Followup to 61f5c8716d
This commit is contained in:
David Taylor 2022-09-22 10:28:02 +01:00 committed by GitHub
parent 7a622f22bc
commit 0c743a591f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,13 +108,12 @@ task "qunit:test", [:timeout, :qunit_path, :filter] do |_, args|
system("yarn", "ember", "build", chdir: "#{Rails.root}/app/assets/javascripts/discourse") system("yarn", "ember", "build", chdir: "#{Rails.root}/app/assets/javascripts/discourse")
test_page = "#{qunit_path}?#{query}&testem=1" test_page = "#{qunit_path}?#{query}&testem=1"
cmd += ["yarn", "testem", "ci", "-f", "testem.js", "-t", test_page] cmd += ["yarn", "testem", "ci", "-f", "testem.js", "-t", test_page]
elsif filter
cmd += ["yarn", "ember", "test", "--query", query, "--filter", filter]
else else
cmd += ["yarn", "ember", "exam", "--query", query] cmd += ["yarn", "ember", "exam", "--query", query]
if parallel = ENV["QUNIT_PARALLEL"] if parallel = ENV["QUNIT_PARALLEL"]
cmd += ["--load-balance", "--parallel", parallel] cmd += ["--load-balance", "--parallel", parallel]
end end
cmd += ["--filter", filter] if filter
end end
system(*cmd, chdir: "#{Rails.root}/app/assets/javascripts/discourse") system(*cmd, chdir: "#{Rails.root}/app/assets/javascripts/discourse")