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 — Remove duplicate test · react/react@95d762e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/use-sync-external-store/src/__tests__
    • useSyncExternalStoreShared-test.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShared-test.js‎

Copy file name to clipboardExpand all lines: packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShared-test.js
-23Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -570,29 +570,6 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
570570
}
571571
});
572572

573-
test('Infinite loop if getSnapshot keeps returning new reference', () => {
574-
const store = createExternalStore({});
575-
576-
function App() {
577-
const text = useSyncExternalStore(store.subscribe, () => ({}));
578-
return <Text text={JSON.stringify(text)} />;
579-
}
580-
581-
spyOnDev(console, 'error');
582-
const root = createRoot();
583-
584-
expect(() => act(() => root.render(<App />))).toThrow(
585-
'Maximum update depth exceeded. This can happen when a component repeatedly ' +
586-
'calls setState inside componentWillUpdate or componentDidUpdate. React limits ' +
587-
'the number of nested updates to prevent infinite loops.',
588-
);
589-
if (__DEV__) {
590-
expect(console.error.calls.argsFor(0)[0]).toMatch(
591-
'The result of getSnapshot should be cached to avoid an infinite loop',
592-
);
593-
}
594-
});
595-
596573
describe('extra features implemented in user-space', () => {
597574
test('memoized selectors are only called once per update', async () => {
598575
const store = createExternalStore({a: 0, b: 0});

0 commit comments

Comments
0 (0)
You are visitor 01402775 — 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.