code: function getClassNames(received) {
    let className
  
    if (received) {
      if (received instanceof HTMLElement) {
        className = received.className
      } else if (received.$$typeof === Symbol.for('react.test.json')) {
        className = getClassNameFromTestRenderer(received)
      } else if (typeof received.findWhere === 'function') {
        className = getClassNameFromEnzyme(received)
      } else if (received.cheerio === '[cheerio object]') {
        className = getClassNameFromCheerio(received)
      }
    }
  
    return className ? className.split(/\s/) : []
  }
docs: eslint-disable-next-line complexity