Allow seed to be passed via ENV.

This commit is contained in:
Guo Xiang Tan 2017-12-19 21:35:51 +08:00
parent 141a4a059d
commit ca8e4dfb43
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ task "qunit:test", [:timeout, :qunit_path] => :environment do |_, args|
test_path = "#{Rails.root}/vendor/assets/javascripts"
qunit_path = args[:qunit_path] || "/qunit"
cmd = "node #{test_path}/run-qunit.js http://localhost:#{port}#{qunit_path}"
options = { seed: Random.new.seed }
options = { seed: (ENV["SEED"] || Random.new.seed) }
%w{module filter qunit_skip_core qunit_single_plugin}.each do |arg|
options[arg] = ENV[arg.upcase] if ENV[arg.upcase].present?