I know about before
, beforeEach
, after
and afterEach
but how do I run some code before ALL tests.
In other words I files like this
test
test1.js
test2.js
test3.js
I run the tests with
mocha --recursive
I don't want to have to put a before
in every test file. I need a beforeAllTests
or a --init=setup.js
or something that I can execute some JavaScript before any tests have been executed. In this particular case I have to configure my system's logging module before the tests run
Is there a way to call some init function that get executed before all tests?