async function runTestAsync(element, opts) {
  if (!axe) {
    // ensure axe is loaded before running tests
    await loadAxe();
  }

  return new Promise((resolve, reject) => {
    // @ts-ignore
    axe.run(element, opts, (err, results) => {
      if (err) {
        reject(new Error(err));
      } else {
        resolve(results);
      }
    });
  });
}
Performs the test using AXE core.
@param {Element} element The element to be used to perform the test on.
@param {Object} opts AXE configuration options.
@return {Promise} Promise resolved to the test results object