@@ -58,6 +58,7 @@ const {IsSomeRendererActing} = ReactSharedInternals;
58
58
type TestRendererOptions = {
59
59
createNodeMock : ( element : React$Element < any > ) => any ,
60
60
unstable_isConcurrent : boolean ,
61
+ unstable_strictMode : boolean ,
61
62
unstable_concurrentUpdatesByDefault : boolean ,
62
63
...
63
64
} ;
@@ -436,6 +437,7 @@ function propsMatch(props: Object, filter: Object): boolean {
436
437
function create ( element : React$Element < any > , options : TestRendererOptions ) {
437
438
let createNodeMock = defaultTestOptions . createNodeMock ;
438
439
let isConcurrent = false ;
440
+ let isStrictMode = false ;
439
441
let concurrentUpdatesByDefault = null ;
440
442
if ( typeof options === 'object' && options !== null ) {
441
443
if ( typeof options . createNodeMock === 'function' ) {
@@ -444,6 +446,9 @@ function create(element: React$Element<any>, options: TestRendererOptions) {
444
446
if ( options . unstable_isConcurrent === true ) {
445
447
isConcurrent = true ;
446
448
}
449
+ if ( options . unstable_strictMode === true ) {
450
+ isStrictMode = true ;
451
+ }
447
452
if ( allowConcurrentByDefault ) {
448
453
if ( options . unstable_concurrentUpdatesByDefault !== undefined ) {
449
454
concurrentUpdatesByDefault =
@@ -461,6 +466,7 @@ function create(element: React$Element<any>, options: TestRendererOptions) {
461
466
isConcurrent ? ConcurrentRoot : LegacyRoot ,
462
467
false ,
463
468
null ,
469
+ isStrictMode ,
464
470
concurrentUpdatesByDefault ,
465
471
) ;
466
472
invariant ( root != null , 'something went wrong ') ;
0 commit comments