@@ -42,7 +42,7 @@ function expectErrors(fn, count) {
4242 }
4343 }
4444 }
45- expect ( console . error . calls . count ( ) ) . toBe ( count ) ;
45+ expectDev ( console . error . calls . count ( ) ) . toBe ( count ) ;
4646 return result ;
4747 } ) ;
4848}
@@ -391,28 +391,6 @@ describe('ReactDOMServer', () => {
391391 expect ( numClicks ) . toEqual ( 2 ) ;
392392 } ) ;
393393
394- describe ( 'basic rendering' , function ( ) {
395- itRenders ( 'should render a blank div' , render =>
396- render ( < div /> ) . then ( e => expect ( e . tagName . toLowerCase ( ) ) . toBe ( 'div' ) ) ) ;
397-
398- itRenders ( 'should render a div with inline styles' , render =>
399- render ( < div style = { { color :'red' , width :'30px' } } /> ) . then ( e => {
400- expect ( e . style . color ) . toBe ( 'red' ) ;
401- expect ( e . style . width ) . toBe ( '30px' ) ;
402- } )
403- ) ;
404-
405- itRenders ( 'should render a self-closing tag' , render =>
406- render ( < br /> ) . then ( e => expect ( e . tagName . toLowerCase ( ) ) . toBe ( 'br' ) ) ) ;
407-
408- itRenders ( 'should render a self-closing tag as a child' , render =>
409- render ( < div > < br /> </ div > ) . then ( e => {
410- expect ( e . childNodes . length ) . toBe ( 1 ) ;
411- expect ( e . firstChild . tagName . toLowerCase ( ) ) . toBe ( 'br' ) ;
412- } )
413- ) ;
414- } ) ;
415-
416394 it ( 'should throw with silly args' , ( ) => {
417395 expect (
418396 ReactDOMServer . renderToString . bind (
@@ -683,4 +661,27 @@ describe('ReactDOMServer', () => {
683661 ) ;
684662 } ) . toThrowError ( / C a n n o t a s s i g n t o r e a d o n l y p r o p e r t y .* / ) ;
685663 } ) ;
664+
665+ describe ( 'basic rendering' , function ( ) {
666+ itRenders ( 'should render a blank div' , render =>
667+ render ( < div /> ) . then ( e => expect ( e . tagName . toLowerCase ( ) ) . toBe ( 'div' ) ) ) ;
668+
669+ itRenders ( 'should render a div with inline styles' , render =>
670+ render ( < div style = { { color :'red' , width :'30px' } } /> ) . then ( e => {
671+ expect ( e . style . color ) . toBe ( 'red' ) ;
672+ expect ( e . style . width ) . toBe ( '30px' ) ;
673+ } )
674+ ) ;
675+
676+ itRenders ( 'should render a self-closing tag' , render =>
677+ render ( < br /> ) . then ( e => expect ( e . tagName . toLowerCase ( ) ) . toBe ( 'br' ) ) ) ;
678+
679+ itRenders ( 'should render a self-closing tag as a child' , render =>
680+ render ( < div > < br /> </ div > ) . then ( e => {
681+ expect ( e . childNodes . length ) . toBe ( 1 ) ;
682+ expect ( e . firstChild . tagName . toLowerCase ( ) ) . toBe ( 'br' ) ;
683+ } )
684+ ) ;
685+ } ) ;
686+
686687} ) ;
0 commit comments