@testing-library/jest-dom
version: 5.14.1
node
version: v16.7.0
npm
(or yarn
) version: 7.21.0
@testing-library/react
version: 12.0.0
Relevant code or config:
expect(document.body).toHaveClass('abc', { exact: true });
What you did:
Testing an element's exact class
What happened:
When the assertion fails, the output is garbled:

Reproduction:
See relevant code above.
Problem description:
Well it's not the expected output that's for sure.
Suggested solution:
Should work similarly to when exact: false
is used:
