@@ -58,7 +58,7 @@ function xmlEqual(x1, x2) {
5858 && x1 . text === x2 . text )
5959 return true ;
6060 return x1 . name === x2 . name
61- // Test attributes for equalitiy
61+ // Test attributes for equality
6262 && Object . keys ( x1 ) . length === Object . keys ( x2 ) . length
6363 && Object . keys ( x1 ) . every ( k => x1 [ k ] === x2 [ k ] )
6464 // Test children for equality
@@ -67,12 +67,7 @@ function xmlEqual(x1, x2) {
6767}
6868
6969describe ( 'window.reactR' , ( ) => {
70- describe ( '#hydrate()' , ( ) => {
71- it ( 'should throw an exception with an unknown component' , ( ) => {
72- assert . throws ( ( ) => {
73- reactR . hydrate ( { Shout : Shout } , stringToTag ( '<Bar/>' ) )
74- } , Error , / U n k n o w n c o m p o n e n t / ) ;
75- } ) ;
70+ describe ( '#hydrate() with HTML' , ( ) => {
7671 it ( 'hydrates an HTML5 component with a text child' , ( ) => {
7772 const markup = '<h1>Hello</h1>' ;
7873 assert . equal (
@@ -88,4 +83,11 @@ describe('window.reactR', () => {
8883 )
8984 } )
9085 } ) ;
86+ describe ( '#hydrate() with Components' , ( ) => {
87+ it ( 'should throw an exception with an unknown component' , ( ) => {
88+ assert . throws ( ( ) => {
89+ reactR . hydrate ( { Shout : Shout } , stringToTag ( '<Bar/>' ) )
90+ } , Error , / U n k n o w n c o m p o n e n t / ) ;
91+ } ) ;
92+ } )
9193} ) ;
0 commit comments