mirror of
https://github.com/discourse/discourse.git
synced 2026-08-10 04:58:31 -05:00
DEV: use REPORT_REQUESTS=1 to find all requests
We can use this to profile our pretender and ensure nothing is superfluous and nothing is missing
This commit is contained in:
@@ -24,6 +24,8 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|
|
||||
abort "Yarn is not installed. Download from https://yarnpkg.com/lang/en/docs/install/"
|
||||
end
|
||||
|
||||
report_requests = ENV['REPORT_REQUESTS'] == "1"
|
||||
|
||||
system("yarn install --dev")
|
||||
|
||||
# ensure we have this port available
|
||||
@@ -63,10 +65,12 @@ task "qunit:test", [:timeout, :qunit_path] do |_, args|
|
||||
options[arg] = ENV[arg.upcase] if ENV[arg.upcase].present?
|
||||
end
|
||||
|
||||
if options.present?
|
||||
cmd += "?#{options.to_query.gsub('+', '%20').gsub("&", '\\\&')}"
|
||||
if report_requests
|
||||
options['report_requests'] = '1'
|
||||
end
|
||||
|
||||
cmd += "?#{options.to_query.gsub('+', '%20').gsub("&", '\\\&')}"
|
||||
|
||||
if args[:timeout].present?
|
||||
cmd += " #{args[:timeout]}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user