GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix[react-devtools/store-test]: fork the test to represent current be… · hanzoai/react@852672f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-devtools-shared/src/__tests__
    • store-test.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: packages/react-devtools-shared/src/__tests__/store-test.js
+31-2Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,8 +1915,12 @@ describe('Store', () => {
19151915
});
19161916
});
19171917

1918-
// @reactVersion >= 18.0
1919-
it('from react get counted', () => {
1918+
// 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]', () => {
19201924
function Example() {
19211925
return [<Child />];
19221926
}
@@ -1938,6 +1942,31 @@ describe('Store', () => {
19381942
`);
19391943
});
19401944

1945+
// @reactVersion >= 18.0
1946+
// @reactVersion < 19.0
1947+
it('from react get counted [React 18.x]', () => {
1948+
function Example() {
1949+
return [<Child />];
1950+
}
1951+
function Child() {
1952+
return null;
1953+
}
1954+
1955+
withErrorsOrWarningsIgnored(
1956+
['Warning: Each child in a list should have a unique "key" prop'],
1957+
() => {
1958+
act(() => render(<Example />));
1959+
},
1960+
);
1961+
1962+
expect(store).toMatchInlineSnapshot(`
1963+
✕ 1, ⚠ 0
1964+
[root]
1965+
▾ <Example> ✕
1966+
<Child>
1967+
`);
1968+
});
1969+
19411970
// @reactVersion >= 18.0
19421971
it('can be cleared for the whole app', () => {
19431972
function Example() {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.