当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Are there any tools out there that measure Angular unit test coverage?

问题描述:

I'm looking to see if there are any tools available to see how much of a code base is covered in unit tests.

网友答案:

There are a lot of frameworks/libraries nowadays for running/doing tests, but if you are using AngularJS you're probably testing with a combination of Mocha and Jasmine.

In any case you can achieve what you want by using coveralls. Just to get you an idea, this is something similar to what you would get:

NOTE: Just in case you are interested, I'm using this generator. It will give you a "nice" setup/skeleton from the beginning; as always, you can tune the project structure and everything else later.

网友答案:

If you started your Angular app from a generator that uses the Karma test runner, such as generator-angular, then install karma-coverage to generate code coverage reports.

分享给朋友:
您可能感兴趣的文章:
随机阅读: