node-cover icon indicating copy to clipboard operation
node-cover copied to clipboard

how to pass node flags?

Open kilianc opened this issue 11 years ago • 1 comments

I need to run something like:

cover run --harmony test/runner.js

kilianc avatar Apr 17 '14 02:04 kilianc

Hi not 100% sure what you mean but I had an issue where I couldn't get the reporter flag to work for my Mocha tests.

I solved it by adding -- after specifying where my test folder is.

Example: "test": "istanbul cover ./node_modules/mocha/bin/_mocha Test -- -R nyan"

Also see an example on the read me:

Want to pass some arguments to your test? No problem (note the --):

cover run mytests.js -- --arg1 --arg2=foo

Hope that helps

EDIT: Didn't see this was nearly 2 years old! :)

LiamKenneth avatar Mar 16 '16 16:03 LiamKenneth