[test] Fix broken tests in react@next
#20472
+73
−37
Merged
react@next
#20472