0

我正在使用 Jasmine 和Jasminerice测试我的 Backbone.js(在 Rails 3.2 上)应用程序。效果很好,但是任何 JS 错误都被困在 Jasmine 中并显示在 HTML 中。这有点不方便,因为我必须复制每个跟踪的行号,转到文件(使用 Chrome 开发人员工具),然后使用“转到行”工具到达该行。

有没有办法在控制台中输出 JS 错误,就像我正常运行应用程序一样?

感谢您的任何帮助。

编辑:

在ConsoleReporter中找到了解决方案。

4

1 回答 1

2

I have the same setup, and I use the guard-jasmine gem for getting output to the console. Works beautifully. I was initially hesitant because I associated guard with autotest-type functionality, but you can use it just to run all your js tests.

于 2012-08-28T00:27:13.940 回答