MCPcopy Create free account
hub / github.com/plotly/dash / warnIfSuspenseResolutionNotWrappedWithActDEV

Function warnIfSuspenseResolutionNotWrappedWithActDEV

dash/deps/react-dom@18.3.1.js:27650–27656  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

27648 }
27649
27650 function warnIfSuspenseResolutionNotWrappedWithActDEV(root) {
27651 {
27652 if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {
27653 error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\n\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\n\n' + 'act(() => {\n' + ' /* finish loading suspended data */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act');
27654 }
27655 }
27656 }
27657
27658 function setIsRunningInsertionEffect(isRunning) {
27659 {

Callers 1

pingSuspendedRootFunction · 0.70

Calls 2

errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…