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:
David Taylor
2017-07-26 14:07:46 +01:00
committed by Sam
parent 917d186303
commit febd7621ea
5 changed files with 60 additions and 19 deletions

View File

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