gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 786 forks source link

Istanbul with bard js #581

Open winnemucca opened 8 years ago

winnemucca commented 8 years ago

I am running istanbul through my a scripts tag that I followed off the documentation. I am able to get the results back but the test fails to read test helpers (bard.js) Is there a work around for this?

============================== Coverage summary ===============================
Statements   : 16.13% ( 5/31 )
Branches     : 100% ( 0/0 )
Functions    : 20% ( 2/10 )
Lines        : 16.13% ( 5/31 )
================================================================================
c:\HA\VSTS\Applications\HA.Web.Main\Scripts\tests2\modules\directives\explore-hero.test.js:9
__cov_5kblceOw9owepJVfC3IOCQ.s['1']++;describe.only('explore hero test directive',function(){__cov_5kblceOw9owepJVfC3IOCQ.f['1']++;__cov_5kblceOw9owepJVfC3IOCQ.s['2']++;describe('explore hero directive',function(){__cov_5kblceOw9owepJVfC3IOCQ.f['2']++;__cov_5kblceOw9owepJVfC3IOCQ.s['3']++;var element,template,scope,controller;__cov_5kblceOw9owepJVfC3IOCQ.s['4']++;beforeEach(function(){__cov_5kblceOw9owepJVfC3IOCQ.f['3']++;__cov_5kblceOw9owepJVfC3IOCQ.s['5']++;bard.appModule('templatesCached','ha.module.core','ha.module.utility');__cov_5kblceOw9owepJVfC3IOCQ.s['6']++;bard.inject('$compile','$controller','$rootScope','$templateCache','haConfig','haSitecoreStrings','$q');});__cov_5kblceOw9owepJVfC3IOCQ.s['7']++;bard.verifyNoOutstandingHttpRequests();__cov_5kblceOw9owepJVfC3IOCQ.s['8']++;beforeEach(function(){__cov_5kblceOw9owepJVfC3IOCQ.f['4']++;__cov_5kblceOw9owepJVfC3IOCQ.s['9']++;bard.mockService(haSitecoreStrings,{

ReferenceError: bard is not defined
gotwarlost commented 8 years ago

where are you require-ing bard?