@@ -14,7 +14,7 @@ import {
14
14
IsThisRendererActing ,
15
15
} from 'react-reconciler/inline.test' ;
16
16
import ReactSharedInternals from 'shared/ReactSharedInternals' ;
17
- import warningWithoutStack from 'shared/warningWithoutStack ' ;
17
+ import warning from 'shared/warning ' ;
18
18
import enqueueTask from 'shared/enqueueTask' ;
19
19
import * as Scheduler from 'scheduler' ;
20
20
@@ -83,7 +83,7 @@ function act(callback: () => Thenable) {
83
83
if ( __DEV__ ) {
84
84
if ( actingUpdatesScopeDepth > previousActingUpdatesScopeDepth ) {
85
85
// if it's _less than_ previousActingUpdatesScopeDepth, then we can assume the 'other' one has warned
86
- warningWithoutStack (
86
+ warning (
87
87
'You seem to have overlapping act() calls, this is not supported. ' +
88
88
'Be sure to await previous act() calls before making a new one. ' ,
89
89
) ;
@@ -115,7 +115,7 @@ function act(callback: () => Thenable) {
115
115
. then ( ( ) => { } )
116
116
. then ( ( ) => {
117
117
if ( called === false ) {
118
- warningWithoutStack (
118
+ warning (
119
119
'You called act(async () => ...) without await. ' +
120
120
'This could lead to unexpected testing behaviour, interleaving multiple act ' +
121
121
'calls and mixing their scopes. You should - await act(async () => ...);' ,
@@ -163,7 +163,7 @@ function act(callback: () => Thenable) {
163
163
} else {
164
164
if ( __DEV__ ) {
165
165
if ( result !== undefined ) {
166
- warningWithoutStack (
166
+ warning (
167
167
'The callback passed to act(...) function ' +
168
168
'must return undefined, or a Promise. You returned %s' ,
169
169
result ,
@@ -191,7 +191,7 @@ function act(callback: () => Thenable) {
191
191
return {
192
192
then ( resolve : ( ) => void ) {
193
193
if ( __DEV__ ) {
194
- warningWithoutStack (
194
+ warning (
195
195
'Do not await the result of calling act(...) with sync logic, it is not a Promise.' ,
196
196
) ;
197
197
}
0 commit comments