Use Mocha rootHooks to Run Setup Once Across Test Files
Mocha 8.2 and later run root hooks once for an entire test run, so shared setup does not repeat in every spec file.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Mocha 8.2 and later run root hooks once for an entire test run, so shared setup does not repeat in every spec file.