当我向 application.js 添加一些垃圾时,我从 Poltergeist 收到以下错误:
Capybara::Poltergeist::JavascriptError: One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).
但是,当我只是抛出异常时,它会被忽略(并且由于缺少页面功能而导致测试失败)。如果页面有未处理的异常,我可以让 Poltergeist 失败吗?或者至少发出警告?