在调试浏览器中使用testacular(现在的业力) [英] debug in browser using testacular (now karma)

查看:156
本文介绍了在调试浏览器中使用testacular(现在的业力)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出调试我的单元测试,当我打破他们的最佳途径。通常,在previous测试环境,我可以运行在浏览器中测试,断点测试,或code,看看为什么我的测试是失败。我似乎无法弄清楚如何做,与触手。有没有一种简单的方法来调试单元测试?

I am trying to figure out the best way to debug my unit tests when I break them. Typically in previous test environments I could just run the tests in the browser and breakpoint the test, or the code and see why my test was failing. I can't seem to figure out how to do that with tentacular. Is there an easy way to debug unit tests?

推荐答案

包含浏览器= ['铬'];在karma.config文件。

Include "browsers = ['Chrome'];" in your karma.config file.

当Chrome浏览器打开时,你应该看到噶 - 连接上方,以调试按钮,右上方。

When Chrome opens, you should see "Karma - connected" at the top, with a "Debug" button to the upper-right.

点击此按钮,调试,和一个噶DEBUG RUNNER选项卡将打开。然后,只需右键单击,检查元素,调试,你通常会。

Click this debug button, and a "Karma DEBUG RUNNER" tab will open. Then, simply right-click, inspect element, and debug as you normally would.

这篇关于在调试浏览器中使用testacular(现在的业力)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆