A Mocha reporter, which extends the spec runner to display and (optionally) enforce blanket Code Coverage metrics
People
Repo info
Activity
Pedro Tacla Yamada
@yamadapc
well
here’s the thing
you can either install the reporter globally, which should work for your local mocha script
or, since you’re using grunt it should already work with the local one
(you’re running a globally installed mocha, which is different from the local one)
or
if you run the command directly from a test script in your package.json, npm will figure out automatically it should use the local version
it’s funny, because I probably have some weird config in my machine to always use local executables
I think I did something like
Ben Cessa
@bcessa
I see; and yes, now that I manage to get it running I intent to integrate it as a grunt task too; let me try initialling the reporter globally and check it out that way
Pedro Tacla Yamada
@yamadapc
but hey
here’s a better approach, which I think I did indirectly on some of my dot files:
export PATH=“./node_modules/.bin:$PATH"
I had forgotten about this
This is good practice, because you’re using the project's executables
(in favor of your own)
Ben Cessa
@bcessa
hey that's a great tip :D thnx a lot man
by the way, the reporter is gorgeous :)
Pedro Tacla Yamada
@yamadapc
no problem
:3
thanks
I mainly just copied from the spec reporter
the nice thing actually is it inherits from it, and could inherit from any other reporter… so I could actually support all of them
but… yeah
problem solved then
_
Ben Cessa
@bcessa
yes, I just comment and close the issue ;) seriously, thanks a lot for your assistance, have a good day