node.js - How to include required files in Istanbul that are not in same directory as test case? -


i'm trying simple, it's not working.. must doing dumb.

i using istanbul mocha code coverage + unit testing.

in code being tested, using functions modules being require'd, , want imported modules included in code coverage - it's not.

i explicitly including library require full path (it not same dir test case resides)

var d = require(srcroot + '/scripting/wf_daemon/daemon_lib'); 

and later, test case making call function in module startworkflow.

d.startworkflow(workflow, function (msg) { // }) 

however, istanbul not go referenced function startworkflow, gives me coverage test file.

what need code coverage extend functions modules require'd test case.

i calling istanbul this:

istanbul cover --include-all-source --dir c:\build\buildarea --print none "c:\program files\nodejs\node_modules\mocha/bin/_mocha" -- --reporter mocha-teamcity-reporter ./test.js 

is there way istanbul instrument files not in directory (or subdirectories) test case resides? simple mistake making?

cheers!


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -