Skip to content

Commit b1c7d67

Browse files
committed
Update snapshot tests
The warning now is counted on the Child instead of the parent. However, this won't be released in 19.0 so I only test this in whatever the next version is.
1 parent 8bf7d08 commit b1c7d67

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/react-devtools-shared/src/__tests__/store-test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,11 +1916,9 @@ describe('Store', () => {
19161916
});
19171917

19181918
// In React 19, JSX warnings were moved into the renderer - https://github.com/facebook/react/pull/29088
1919-
// When the error is emitted, the source fiber of this error is not yet mounted
1920-
// So DevTools can't connect the error and the fiber
1921-
// TODO(hoxyq): update RDT to keep track of such fibers
1922-
// @reactVersion >= 19.0
1923-
it('from react get counted [React >= 19]', () => {
1919+
// The warning is moved to the Child instead of the Parent.
1920+
// @reactVersion >= 19.0.1
1921+
it('from react get counted [React >= 19.0.1]', () => {
19241922
function Example() {
19251923
return [<Child />];
19261924
}
@@ -1936,9 +1934,10 @@ describe('Store', () => {
19361934
);
19371935

19381936
expect(store).toMatchInlineSnapshot(`
1937+
✕ 1, ⚠ 0
19391938
[root]
19401939
▾ <Example>
1941-
<Child>
1940+
<Child>
19421941
`);
19431942
});
19441943

0 commit comments

Comments
 (0)