1

I have 2 env:

i run test with this command "mocha specs/* --opts ./mocha.opts" and default run dev ENV. What command I can use for a run with local.example.js ENV ?

Like "mocha specs/* --opts ./mocha.opts --env local.example.js"

1 Answers1

1

If you are using mocha version 6+, you might consider defining configuration in a *.js file instead of legacy *.opts file.

Then you will be able to run mocha tests with

$ mocha specs/* --config path/to/config.js

More information here: https://mochajs.org/#-config-path

i9or
  • 1,998
  • 1
  • 14
  • 20