jasmine with jscoverage automated testing

前端 未结 2 827
时光取名叫无心
时光取名叫无心 2021-02-20 15:57

Had been looking at the jsunit and jcoverage demos here (click on coverage report link. Open this in a new tab).

I was wondering if any one had done anything si

2条回答
  •  醉酒成梦
    2021-02-20 16:24

    If you're not using the jasmine-gem, or don't want to have to run a server to check coverage, I've written a gem that pulls together jscoverage and jasmine. It can run as a rake task in your CI builds.

    It can be found here: https://github.com/firstbanco/jasmine-coverage

    Install it, then just run

    bundle exec rake jasmine:coverage
    

    You're done.

    EDIT: As the author of jasmine-coverage, I feel duty bound to to tell you about a better alternative: teaspoon. It requires more setup, but also allows running in the browser so you can use the Chrome debugger.

提交回复
热议问题