mmoulton/grunt-mocha-cov — pull request #30 by xaka (2014-02-05 07:37:02+00:00)
Title: Allow to pass CLI options to mocha

The idea behing this changeset is pretty simple. I'm too lazy to modify
my Gruntfile everytime i want to pass any option to mocha just for
single run. For instance if you have 1 failing test, you don't want to
run other ones and waste your time, you want to grep this particular one
that is failing and keep working on it until it's fixed so i'd prefer to
pass --grep from CLI rather than modify Gruntfile that would appear in
git status and rollback it later when i'm done.

Options passed via CLI have higher precedence than options passed via
Gruntfile so you can easly override them whenever you want to.

I'm using optimist to parse CLI options and i'm using grunt.option.flags() to get those instead of process.argv

P.S. I've sorted npm dependencies and devDependencies as i didn't know where to put optimist :) I hope it doesn't hurt anyone's feelings.