简体   繁体   中英

Code Coverage for browser unit tests

We are writing unit tests for library where test cases are on client side. And we need to see code coverage for this library. We have our own custom wrapper and we are not using nodejs on server side is on python. Is there a suitable tool for this job?

If you want to test a clientside javascript library karma is a pretty good choice. It is quite easy to learn and it gives you alot of functionality:

http://karma-runner.github.io/0.13/index.html

Karma got a coverage report which gives you information about code coverage. Combined with Jasmine you get a solid testing suite.

This is now possible via Chrome dev-tools (As of Chrome 59). See this post for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM