I\'m trying to create mocha tests for my controllers using a config that has to be loaded async. Below is my code. However, when the mocha test is run, it doesn\'t run any
You could just separate the logic of testing and loading entirely, wrap the loader in a promise that blocks the test until the config is executed (very straightforward with async/await if you're using node8, otherwise just Promise.each the results).
If you really dont wanna do that you could Promisify your testing framework, which would then allow you to treat all describe/it blocks as asynchronous code.