Commit ba708fa
authored
Remove ReactNoop.flushDeferredPri and flushUnitsOfWork (#14934)
* Remove ReactNoop.flushDeferredPri and flushUnitsOfWork
Some of our older tests worked by counting how many times React checked
whether it should yield to the main thread, instead of something
publicly observable like how many times a component is rendered.
Our newer tests have converged on a style where we push into a log and
make assertions on the log. This pattern is less coupled to the
implementation while still being sufficient to test performance
optimizations, like resuming (whenever we add that back).
This commit removes flushDeferredPri and flushUnitsOfWork and upgrades
the affected tests.
* Remove shouldYieldToRenderer indirection
This wrapper is no longer necessary.1 parent 920b0bb commit ba708fa
File tree
13 files changed
+309
-386
lines changed- packages
- react-noop-renderer/src
- react-reconciler/src
- __tests__
- __snapshots__
13 files changed
+309
-386
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
757 | 753 | | |
758 | | - | |
| 754 | + | |
759 | 755 | | |
760 | 756 | | |
761 | 757 | | |
762 | 758 | | |
763 | 759 | | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
775 | 763 | | |
776 | 764 | | |
777 | 765 | | |
778 | | - | |
| 766 | + | |
779 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
780 | 771 | | |
781 | 772 | | |
782 | 773 | | |
| |||
847 | 838 | | |
848 | 839 | | |
849 | 840 | | |
850 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
851 | 848 | | |
852 | 849 | | |
853 | 850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
| 1217 | + | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| |||
2007 | 2007 | | |
2008 | 2008 | | |
2009 | 2009 | | |
2010 | | - | |
| 2010 | + | |
2011 | 2011 | | |
2012 | 2012 | | |
2013 | 2013 | | |
| |||
2204 | 2204 | | |
2205 | 2205 | | |
2206 | 2206 | | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
2222 | 2207 | | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
2226 | | - | |
2227 | | - | |
2228 | | - | |
2229 | | - | |
2230 | | - | |
2231 | | - | |
2232 | | - | |
2233 | | - | |
2234 | | - | |
2235 | | - | |
2236 | | - | |
2237 | | - | |
2238 | | - | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
2239 | 2222 | | |
2240 | | - | |
2241 | | - | |
2242 | | - | |
2243 | 2223 | | |
| 2224 | + | |
2244 | 2225 | | |
2245 | 2226 | | |
2246 | 2227 | | |
| |||
2266 | 2247 | | |
2267 | 2248 | | |
2268 | 2249 | | |
2269 | | - | |
| 2250 | + | |
2270 | 2251 | | |
2271 | 2252 | | |
2272 | 2253 | | |
| |||
2414 | 2395 | | |
2415 | 2396 | | |
2416 | 2397 | | |
2417 | | - | |
| 2398 | + | |
2418 | 2399 | | |
2419 | 2400 | | |
2420 | 2401 | | |
| |||
0 commit comments