function hasComment(node, flags, fn) {
  if (!isNonEmptyArray(node?.comments)) {
    return false;
  }
  const test = getCommentTestFunction(flags, fn);
  return test ? node.comments.some(test) : true;
}
@param {Estree.Node} node
@param {number | function} [flags]
@param {function} [fn]
@returns {boolean}