mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Qunit plugin rake tasks (#4985)
* Allow running specific plugin tests using ENV variables * Add a `rake plugin:qunit` task to match the existing `rake plugin:spec` task * Improve docker.rake to allow running specific plugin qunit tests * Purge cache before and after qunit tests * Stop module auto-loader trying to auto-load tests * Use URL query parameters to pass config into Qunit, avoiding caching issues * Oops, searchParams doesn’t work in phantomJS. Parse the URL manually. * Escape ampersands before passing URL to phantomJS, otherwise multiple parameters go wrong
This commit is contained in:
@@ -39,12 +39,12 @@ task "qunit:test", [:timeout] => :environment do |_, args|
|
||||
|
||||
options = {}
|
||||
|
||||
%w{module filter}.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
|
||||
|
||||
if options.present?
|
||||
cmd += "?#{options.to_query.gsub('+', '%20')}"
|
||||
cmd += "?#{options.to_query.gsub('+', '%20').gsub("&", '\\\&')}"
|
||||
end
|
||||
|
||||
if args[:timeout].present?
|
||||
|
Reference in New Issue
Block a user