Skip to content Skip to sidebar Skip to footer

No Mocha Tests Run Or Report When Using Npm With | Xargs

I'm trying to use npm to run mocha tests like this: scripts: { test: 'find ./src ./test -name *.js | xargs mocha --opts mocha.opts' } this works fine when I execute it straight

Solution 1:

You probably need to escape the *.js:

scripts: {
  test: "find ./src ./test -name '*.js' | xargs mocha --opts mocha.opts"
}

Post a Comment for "No Mocha Tests Run Or Report When Using Npm With | Xargs"