Skip to content

Commit 99dbbb6

Browse files
don't fire missing act() warnings for react-art (#15975)
* use toWarnDev for dom fixture tests forks toWarnDev from root into fixture/dom, updates tes tests to use it * disable act() warnings for react-art() - For 'secondary' renderers like react-act, we don't want to fire missing act() warnings; the wrapping renderer will fire warnings anyway, and when it flushes, it flushes effects *across* renderers. - I could have used isPrimaryRenderer as the flag, but this is marked as false for react-test-renderer, and we *do* want the warning to fire for it. Hence a new flag. * add missing dependency `art` to fixtures/dom
1 parent ec51f63 commit 99dbbb6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ReactTestHostConfig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ export function createTextInstance(
261261
}
262262

263263
export const isPrimaryRenderer = false;
264+
export const shouldWarnUnactedUpdates = true;
264265

265266
export const scheduleTimeout = setTimeout;
266267
export const cancelTimeout = clearTimeout;

0 commit comments

Comments
 (0)