function assertArrowPosition(subMenu, left) {
  const arrow = getArrowElement(subMenu);
  /**
   * @suppress {strictMissingProperties} suppression added to enable type
   * checking
   */
  const expectedLeft =
      left ? 0 : arrow.offsetParent.offsetWidth - arrow.offsetWidth;
  /**
   * @suppress {strictMissingProperties} suppression added to enable type
   * checking
   */
  const actualLeft = arrow.offsetLeft;
  assertTrue(
      `Expected left offset: ${expectedLeft}
` +
          'Actual left offset: ' + actualLeft + '\n',
      Math.abs(expectedLeft - actualLeft) < 5);
}
Asserts that the arrow position is correct.
@param {SubMenu} subMenu The sub menu.
@param {boolean} leftAlign True for left-aligned, false for right-aligned.
@suppress {checkTypes} suppression added to enable type checking