使用Jasmine BDD获取已执行代码的堆栈跟踪(Getting a stack trace of your executed code with Jasmine BDD)

编程入门 行业动态 更新时间:2024-10-26 16:25:48
使用Jasmine BDD获取已执行代码的堆栈跟踪(Getting a stack trace of your executed code with Jasmine BDD)

我一直在使用Jasmine来测试我的Rails应用程序的javascript代码。 但是,当我运行rake jasmine并查看网页时。 失败期望的堆栈跟踪只显示jasmine.js文件,而不是我的代码。 有没有办法让它显示我的代码在Rspec中失败的地方?

I've been using Jasmine to test my Rails application's javascript code. However, when i run rake jasmine and view the webpage. The stack traces for failed expectations just show the jasmine.js file, not my code. Is there a way to get it to show where my code is failing like in Rspec?

最满意答案

如果其他人遇到这个问题,我发现使用jasmine-headless-webkit gem有很多帮助。

Incase anyone else runs into this issue, i found using the jasmine-headless-webkit gem helps a lot.

更多推荐

本文发布于:2023-08-04 14:05:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1416127.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:堆栈   代码   BDD   Jasmine   code

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!