Add TC_Modules test_safe_client_debug_log

This commit is contained in:
Brendan Coles
2015-06-27 18:57:47 +00:00
parent 8b4ad51899
commit 694ec61a02

View File

@@ -48,4 +48,14 @@ class TC_Modules < Test::Unit::TestCase
end
def test_safe_client_debug_log
Dir['../../modules/**/*.js'].each do |path|
File.open(path) do |f|
f.grep(/\W*console\.log\W*\(/im) do |line|
assert(false, "Function 'console.log' used instead of 'beef.debug' in command module: " + path + ':' + line)
end
end
end
end
end