JavaScript code coverage with Jasmine(Jasmine 的 JavaScript 代码覆盖率)
问题描述
我们计划在我们的项目中引入 JavaScript 单元测试,到目前为止,Jasmine 似乎是 JavaScript 更好的 BDD 单元测试框架之一.现在我想知道我们如何监控 JavaScript 代码的代码覆盖率.有没有我们可以使用的工具/插件?我们是一家微软商店,使用 .NET/MVC 4.
We are planning to introduce JavaScript unit testing in our project and so far Jasmine appears to be one of the better BDD unit testing frameworks for JavaScript. Now I am wondering how can we monitor code coverage of our JavaScript code. Are there any tools/plugins that we could use? We are a Microsoft shop and use .NET/MVC 4.
推荐答案
有 Istanbul 代码覆盖率工具.而且,由于有一个 grunt 用于伊斯坦布尔/Jasmine 的插件,它应该可以与 Jasmine 一起使用.
There is the Istanbul code coverage tool. And, as there is a grunt plugin for Istanbul/Jasmine it should work with Jasmine.
这篇关于Jasmine 的 JavaScript 代码覆盖率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Jasmine 的 JavaScript 代码覆盖率


- 如何向 ipc 渲染器发送添加回调 2022-01-01
- 如何显示带有换行符的文本标签? 2022-01-01
- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01