Skip to content

A platform for community discussion. Free, open, simple.

DEV: Add env variable to allow easier debugging of smoke tests

Gerhard Schlager452d541b74e0
diff --git a/lib/tasks/smoke_test.rake b/lib/tasks/smoke_test.rake
index 70abebcc985..fd7c70529ce 100644
--- a/lib/tasks/smoke_test.rake
+++ b/lib/tasks/smoke_test.rake
@@ -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