@@ -26,45 +26,26 @@ export function render(element: ReactElement): RenderResult {
2626 false , // isStrictMode
2727 null , // concurrentUpdatesByDefaultOverride
2828 'id' , // identifierPrefix
29- ( _error ) => {
30- // eslint-disable-next-line no-console
31- console . log ( 'Recoverable Error' , _error ) ;
32- } , // onRecoverableError
29+ ( _error ) => { } , // onRecoverableError
3330 null , // transitionCallbacks
3431 ) ;
3532
36- TestReconciler . updateContainer ( element , containerFiber , null , ( ) => {
37- // eslint-disable-next-line no-console
38- //console.log('Rendered', container?.children);
39- } ) ;
40-
41- // update(newElement: React$Element<any>) {
42- // if (root == null || root.current == null) {
43- // return;
44- // }
45- // ReactReconciler.updateContainer(newElement, root, null, null);
46- // },
33+ TestReconciler . updateContainer ( element , containerFiber , null , null ) ;
4734
4835 const update = ( element : ReactElement ) => {
4936 if ( containerFiber == null || container == null ) {
5037 return ;
5138 }
5239
53- TestReconciler . updateContainer ( element , containerFiber , null , ( ) => {
54- // eslint-disable-next-line no-console
55- //console.log('Updated', container?.children);
56- } ) ;
40+ TestReconciler . updateContainer ( element , containerFiber , null , null ) ;
5741 } ;
5842
5943 const unmount = ( ) => {
6044 if ( containerFiber == null || container == null ) {
6145 return ;
6246 }
6347
64- TestReconciler . updateContainer ( null , containerFiber , null , ( ) => {
65- // eslint-disable-next-line no-console
66- //console.log('Unmounted', container?.children);
67- } ) ;
48+ TestReconciler . updateContainer ( null , containerFiber , null , null ) ;
6849
6950 container = null ;
7051 containerFiber = null ;
@@ -79,14 +60,16 @@ export function render(element: ReactElement): RenderResult {
7960 return renderToJson ( container . children [ 0 ] ) ;
8061 }
8162
63+ // Taken from React Test Renderer
8264 // TODO: When could that happen?
8365 if (
8466 container . children . length === 2 &&
8567 container . children [ 0 ] . isHidden === true &&
8668 container . children [ 1 ] . isHidden === false
8769 ) {
88- // Omit timed out children from output entirely, including the fact that we
89- // temporarily wrap fallback and timed out children in an array.
70+ // Taken from React Test Renderer
71+ // > Omit timed out children from output entirely, including the fact that we
72+ // > temporarily wrap fallback and timed out children in an array.
9073 return renderToJson ( container . children [ 1 ] ) ;
9174 }
9275
0 commit comments