docstr: Test if the component raises an error when incorrect metadata is supplied by the user.
docstr_tok: ["Test","if","the","component","raises","an","error","when","incorrect","metadata","is","supplied","by","the","user","."]
code: def test_incorrect_meta(self, test_files_path):
      """
      Test if the component raises an error when incorrect metadata is supplied by the user.
      """
      converter = HTMLToDocument()
      sources = [test_files_path / "html" / "what_is_haystack.html"]
      metadata = [
          {"file_name": "what_is_haystack.html"},
          {"file_name": "haystack.html"},
      ]
      with pytest.raises(
          ValueError,
          match="The length of the metadata list must match the number of sources.",
      ):
          converter.run(sources=sources, meta=metadata)
  
file_path: haystack/test/components/converters/test_html_to_document.py
imports: import logging
  import pytest
  from haystack.components.converters import HTMLToDocument
  from haystack.dataclasses import ByteStream
label_desc: Use image node_id 4 for calling the TestHTMLToDocument obj's underlying member method code with example usage: obj.test_incorrect_meta(test_files_path) without return types