Jasmine-gem / jasmine:ci : 如何使用 console.log?

Zac*_*ach 4 javascript testing ruby-on-rails jasmine

我正在使用jasmine-gem作为 rails 项目的一部分。

我知道我可以在浏览器中使用 运行测试rake jasmine,但我需要通过rake jasmine:ci.

当我在 headless/ci 模式下运行它们时,console.logs 不会被输出。我怎样才能做到这一点?也许有什么jasmine_helper.rb

Zac*_*ach 5

弄清楚了。

jasmine_helpers.rb

Jasmine.configure do |config|
  config.show_console_log = true
end
Run Code Online (Sandbox Code Playgroud)