async function beaconCountIs(count, opts = {}) {
  await browser.waitUntil(async () => {
    const beacons = await getBeacons(opts);

    return beacons.length === count;
  });
}
Runs a webdriverio waitUntil command, ending once the specified number of
beacons haven been received (optionally matching the passed `opts` object).