-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
@testing-library/react
version: 16.3.0- Testing Framework and version:
"jest": "^30.0.5", - DOM Environment:
"jest-environment-jsdom": "^30.0.5",
Relevant code or config:
import { render } from "@testing-library/react";
describe( () => {
it(() => {
const {container} = render(<link rel="preconnect" key="bla" href='/bla' />);
expect(container).toMatchSnapshot()
});
});
What you did:
We want to update to react 19. But the tests made with testing-library are failing.
What happened:
When running the test from above this is the snapshot we receive:
- Snapshot - 6
+ Received + 1
- <div>
- <link
- href="/bla"
- rel="preconnect"
- />
- </div>
+ <div />
Reproduction:
https://codesandbox.io/p/devbox/zf2xft?file=%2Fpackage.json%3A14%2C3-15%2C26
Change the version of react to:
"react": "19.1.0",
"react-dom": "19.1.0"
Problem description:
- inconsistent testing response between react versions
Metadata
Metadata
Assignees
Labels
No labels