Closed
Description
@testing-library/jest-dom
version:4.1.0
node
version:12.8.0
npm
(oryarn
) version:6.11.2
Relevant code or config:
it("should not pass", () => {
const { getByText } = render(
<span style={{ textDecoration: "line-through" }}>some text</span>
);
expect(getByText("some text")).toHaveStyle("hahaha:not a style");
})
Problem description:
That test should fail, but any typo or invalid style will pass.
Suggested solution:
Get #81 into an acceptable state.
I'm mainly opening this issue to help others who might run into this pretty important bug.
I'm sure people using this library currently have tests that are passing that should not.
Metadata
Metadata
Assignees
Labels
No labels