DEV: Add env variable to allow easier debugging of smoke tests
Set `DEBUG_NODE=1` when running `rake smoke:test` and use your favorite tool to debug the smoke tests. See https://nodejs.org/en/docs/guides/debugging-getting-started/ for more information. The debugger will break at the beginning of the smoke tests when the env variable is set.
This commit is contained in:
parent
decbc9194d
commit
452d541b74
|
@ -68,7 +68,12 @@ task "smoke:test" do
|
|||
|
||||
results = +""
|
||||
|
||||
IO.popen("node #{Rails.root}/test/smoke_test.js #{url}").each do |line|
|
||||
node_arguments = []
|
||||
node_arguments << '--inspect-brk' if ENV["DEBUG_NODE"]
|
||||
node_arguments << "#{Rails.root}/test/smoke_test.js"
|
||||
node_arguments << url
|
||||
|
||||
IO.popen("node #{node_arguments.join(' ')}").each do |line|
|
||||
puts line
|
||||
results << line
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue