Closed
Description
After receiving HTML from a function, toContainHTML will throw an error without any explanation. No 'expected', terminal will only show what it received.
Jest test:
expect(getElement('paragraph', 'footer')).toContainHTML('<p class="paragraph second-paragraph" id="id7">this is the second paragraph of footer</p>');
Terminal log:
Received: <p class="paragraph second-paragraph" id="id7">this is the second paragraph of footer</p>
If I use toContainElement, it will throw an error that it receives a string and not an HTML element.
The getElement function will return the HTML element as soon as they find a match with the classes ("class="paragraph second-paragraph")