@@ -87,17 +87,8 @@ describe('ReactDOMServerIntegration', () => {
8787 { '' }
8888 </ div > ,
8989 ) ;
90- if ( render === serverRender || render === streamRender ) {
91- // For plain server markup result we should have no text nodes if
92- // they're all empty.
93- expect ( e . childNodes . length ) . toBe ( 0 ) ;
94- expect ( e . textContent ) . toBe ( '' ) ;
95- } else {
96- expect ( e . childNodes . length ) . toBe ( 3 ) ;
97- expectTextNode ( e . childNodes [ 0 ] , '' ) ;
98- expectTextNode ( e . childNodes [ 1 ] , '' ) ;
99- expectTextNode ( e . childNodes [ 2 ] , '' ) ;
100- }
90+ expect ( e . childNodes . length ) . toBe ( 0 ) ;
91+ expect ( e . textContent ) . toBe ( '' ) ;
10192 } ) ;
10293
10394 itRenders ( 'a div with multiple whitespace children' , async render => {
@@ -162,27 +153,14 @@ describe('ReactDOMServerIntegration', () => {
162153
163154 itRenders ( 'a leading blank child with a text sibling' , async render => {
164155 const e = await render ( < div > { '' } foo</ div > ) ;
165- if ( render === serverRender || render === streamRender ) {
166- expect ( e . childNodes . length ) . toBe ( 1 ) ;
167- expectTextNode ( e . childNodes [ 0 ] , 'foo' ) ;
168- } else {
169- expect ( e . childNodes . length ) . toBe ( 2 ) ;
170- expectTextNode ( e . childNodes [ 0 ] , '' ) ;
171- expectTextNode ( e . childNodes [ 1 ] , 'foo' ) ;
172- }
156+ expect ( e . childNodes . length ) . toBe ( 1 ) ;
157+ expectTextNode ( e . childNodes [ 0 ] , 'foo' ) ;
173158 } ) ;
174159
175160 itRenders ( 'a trailing blank child with a text sibling' , async render => {
176161 const e = await render ( < div > foo{ '' } </ div > ) ;
177- // with Fiber, there are just two text nodes.
178- if ( render === serverRender || render === streamRender ) {
179- expect ( e . childNodes . length ) . toBe ( 1 ) ;
180- expectTextNode ( e . childNodes [ 0 ] , 'foo' ) ;
181- } else {
182- expect ( e . childNodes . length ) . toBe ( 2 ) ;
183- expectTextNode ( e . childNodes [ 0 ] , 'foo' ) ;
184- expectTextNode ( e . childNodes [ 1 ] , '' ) ;
185- }
162+ expect ( e . childNodes . length ) . toBe ( 1 ) ;
163+ expectTextNode ( e . childNodes [ 0 ] , 'foo' ) ;
186164 } ) ;
187165
188166 itRenders ( 'an element with two text children' , async render => {
0 commit comments