mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +08:00
DEV: Allow rake qunit
filter to be used alongside parallel option (#18326)
Followup to 61f5c8716d
This commit is contained in:
parent
7a622f22bc
commit
0c743a591f
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user