I'm trying to follow along with
In an effort to do
./node_modules/.bin/mocha --reporter json -u tdd
I have tried
var mocha = spawn('./node_modules/.bin/mocha', ['--reporter json -u tdd']);
But I get the following error
error: unknown option `--reporter json -u tdd'
What am I doing wrong?
Looking quickly at the reference URL you provided, it seems that your bracketed arguments need to be separate:
var mocha = spawn('./node_modules/.bin/mocha', ['--reporter','json','-u','tdd']);
There is currently no discussion for this recipe.
This recipe can be found in it's original form on Stack Over Flow.