import pytest
from scrapegraphai.utils.convert_to_md import convert_to_md
def test_basic_html_to_md():
html = "
This is a paragraph.
This is a heading.
"
assert convert_to_md(html) is not None
def test_html_with_links_and_images():
html = 'This is a link and this is an 
'
assert convert_to_md(html) is not None
def test_html_with_tables():
html = '''
| Header 1 | Header 2 |
| Row 1, Cell 1 | Row 1, Cell 2 |
| Row 2, Cell 1 | Row 2, Cell 2 |
'''
assert convert_to_md(html) is not None
def test_empty_html():
html = ""
assert convert_to_md(html) is not None
def test_complex_html_structure():
html = '''
Main Heading
This is a bold paragraph with italic text.
- First item
- Second item
- Third item
Another paragraph with a link.
'''
assert convert_to_md(html) is not None