htmlForInvalid = (assertType) => {
  const expectedError = expectedErrors[assertType];
  return [
    { code: '<label htmlFor="js_id"><span><span><span>A label</span></span></span></label>', options: [{ depth: 4 }], errors: [expectedError] },
    { code: '<label htmlFor="js_id" aria-label="A label" />', errors: [expectedError] },
    { code: '<label htmlFor="js_id" aria-labelledby="A label" />', errors: [expectedError] },
    // Custom label component.
    { code: '<CustomLabel htmlFor="js_id" aria-label="A label" />', options: [{ labelComponents: ['CustomLabel'] }], errors: [expectedError] },
    { code: '<CustomLabel htmlFor="js_id" label="A label" />', options: [{ labelAttributes: ['label'], labelComponents: ['CustomLabel'] }], errors: [expectedError] },
    { code: '<CustomLabel htmlFor="js_id" aria-label="A label" />', settings: componentsSettings, errors: [expectedError] },
    // Custom label attributes.
    { code: '<label htmlFor="js_id" label="A label" />', options: [{ labelAttributes: ['label'] }], errors: [expectedError] },
  ];
}
@fileoverview Enforce label tags have an associated control.
@author Jesse Beach