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.
pull/4770/head
Richard Hansen 2021-02-12 19:39:31 -05:00 committed by John McLear
parent 6953e40c75
commit fc9b22475a
1 changed files with 5 additions and 0 deletions

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;