mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
nit: a quick copy edit for an act() message/comment (#15805)
This commit is contained in:
+1
-4
@@ -2388,17 +2388,14 @@ export function warnIfNotScopedWithMatchingAct(fiber: Fiber): void {
|
||||
if (__DEV__) {
|
||||
if (
|
||||
ReactCurrentActingRendererSigil.current !== null &&
|
||||
// use the function flushPassiveEffects directly as the sigil
|
||||
// so this comparison is expected here
|
||||
ReactCurrentActingRendererSigil.current !== ReactActingRendererSigil
|
||||
) {
|
||||
// it looks like we're using the wrong matching act(), so log a warning
|
||||
warningWithoutStack(
|
||||
false,
|
||||
"It looks like you're using the wrong act() around your test interactions.\n" +
|
||||
'Be sure to use the matching version of act() corresponding to your renderer:\n\n' +
|
||||
'// for react-dom:\n' +
|
||||
"import {act} from 'react-test-utils';\n" +
|
||||
"import {act} from 'react-dom/test-utils';\n" +
|
||||
'//...\n' +
|
||||
'act(() => ...);\n\n' +
|
||||
'// for react-test-renderer:\n' +
|
||||
|
||||
Reference in New Issue
Block a user