Skip to content

Commit

Permalink
Update snapshot tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sebmarkbage committed Jun 6, 2024
1 parent 8bf7d08 commit e5b3499
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-devtools-shared/src/__tests__/store-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1919,8 +1919,8 @@ describe('Store', () => {
// When the error is emitted, the source fiber of this error is not yet mounted
// So DevTools can't connect the error and the fiber
// TODO(hoxyq): update RDT to keep track of such fibers
// @reactVersion >= 19.0
it('from react get counted [React >= 19]', () => {
// @reactVersion >= 19.0.1
it('from react get counted [React >= 19.0.1]', () => {
function Example() {
return [<Child />];
}
Expand All @@ -1936,9 +1936,10 @@ describe('Store', () => {
);

expect(store).toMatchInlineSnapshot(`
✕ 1, ⚠ 0
[root]
▾ <Example>
<Child>
<Child>
`);
});

Expand Down

0 comments on commit e5b3499

Please sign in to comment.