tests: Always call backend common.init() at startup

This provides a place to set the timeout for `common.init()` so that
individual tests don't have to.
This commit is contained in:
Richard Hansen 2021-02-12 19:39:31 -05:00 committed by John McLear
parent 6953e40c75
commit fc9b22475a

View file

@ -23,6 +23,11 @@ const logLevel = exports.logger.level;
// https://github.com/mochajs/mocha/issues/2640
process.on('unhandledRejection', (reason, promise) => { throw reason; });
before(async function () {
this.timeout(60000);
await exports.init();
});
exports.init = async function () {
if (agentPromise != null) return await agentPromise;
let agentResolve;