2

I just started using mocha to test my site. My test runner expects some command-line arguments though. When I run

mocha mytest.js arg1 arg2

All the args to to mocha, not my mytest script. Is there a way to forward them along?

mpen
  • 256,080
  • 255
  • 805
  • 1,172
  • Possible duplicate of [Mocha tests with extra options or parameters](http://stackoverflow.com/questions/16144455/mocha-tests-with-extra-options-or-parameters) – woshilapin Feb 16 '17 at 21:43

1 Answers1

2

mocha is going to think those are paths to test files/directories. Maybe use environment variables or a configuration file instead of command line arguments.

Peter Lyons
  • 137,901
  • 29
  • 269
  • 269