@@ -4,6 +4,7 @@ var React = require('react');
4
4
var ReactTestUtils = require ( 'react/lib/ReactTestUtils' ) ;
5
5
var EventConstants = require ( 'react/lib/EventConstants' ) ;
6
6
var Router = require ( '../index' ) ;
7
+ var CaptureClicks = require ( '../lib/CaptureClicks' ) ;
7
8
8
9
var historyAPI = (
9
10
window . history !== undefined &&
@@ -69,7 +70,7 @@ describe('Routing', function() {
69
70
var App = React . createClass ( {
70
71
71
72
render : function ( ) {
72
- return React . DOM . div ( { onClick : this . props . onClick } ,
73
+ return div ( { onClick : this . props . onClick } ,
73
74
Router . Locations ( {
74
75
ref : 'router' , className : 'App' ,
75
76
onNavigation : this . props . navigationHandler ,
@@ -98,7 +99,7 @@ describe('Routing', function() {
98
99
handler : function ( props ) { return div ( null , 'not_found' ) }
99
100
} )
100
101
) ,
101
- Router . CaptureClicks ( { gotoURL : this . gotoURL } ,
102
+ CaptureClicks ( { gotoURL : this . gotoURL } ,
102
103
a ( { ref : 'anchor' , href : '/__zuul/hi' } ) ,
103
104
a ( { ref : 'anchorUnhandled' , href : '/goodbye' } ) ,
104
105
a ( { ref : 'anchorExternal' , href : 'https://github.com/andreypopp/react-router-component' } )
@@ -316,7 +317,7 @@ describe('Routing with async components', function() {
316
317
if ( this . context . router . hasPendingUpdate ( ) ) {
317
318
mainSeenPendingUpdate = true ;
318
319
}
319
- return React . DOM . div ( null , this . state . message ? this . state . message : 'loading...' ) ;
320
+ return div ( null , this . state . message ? this . state . message : 'loading...' ) ;
320
321
}
321
322
} ) ;
322
323
@@ -333,7 +334,7 @@ describe('Routing with async components', function() {
333
334
if ( ! this . state . message ) {
334
335
aboutWasInLoadingState = true ;
335
336
}
336
- return React . DOM . div ( null , this . state . message ? this . state . message : 'loading...' ) ;
337
+ return div ( null , this . state . message ? this . state . message : 'loading...' ) ;
337
338
}
338
339
} ) ;
339
340
@@ -405,7 +406,7 @@ describe('Nested routers', function() {
405
406
406
407
var NestedRouter = React . createClass ( {
407
408
render : function ( ) {
408
- return React . DOM . div ( null ,
409
+ return div ( null ,
409
410
Router . Locations ( null ,
410
411
Router . Location ( {
411
412
path : '/__zuul/nested/' ,
@@ -426,7 +427,7 @@ describe('Nested routers', function() {
426
427
var App = React . createClass ( {
427
428
428
429
render : function ( ) {
429
- return React . DOM . div ( null ,
430
+ return div ( null ,
430
431
Router . Locations ( { ref : 'router' , className : 'App' } ,
431
432
Router . Location ( {
432
433
path : '/__zuul' ,
@@ -441,7 +442,7 @@ describe('Nested routers', function() {
441
442
handler : NestedRouter
442
443
} )
443
444
) ,
444
- Router . CaptureClicks ( { gotoURL : this . gotoURL } ,
445
+ CaptureClicks ( { gotoURL : this . gotoURL } ,
445
446
a ( { ref : 'anchor' , href : '/__zuul/nested/page' } ) ,
446
447
a ( { ref : 'anchorNestedRoot' , href : '/__zuul/nested/' } ) ,
447
448
a ( { ref : 'anchorUnhandled' , href : '/__zuul/nested/404' } )
@@ -515,7 +516,7 @@ describe('Contextual routers', function() {
515
516
var SubCat = React . createClass ( {
516
517
517
518
render : function ( ) {
518
- return React . DOM . div ( null ,
519
+ return div ( null ,
519
520
Router . Locations ( { ref : 'router' , contextual : true } ,
520
521
Router . Location ( {
521
522
path : '/' ,
@@ -651,7 +652,7 @@ describe('Multiple active routers', function() {
651
652
}
652
653
} )
653
654
) ;
654
- return React . DOM . div ( { ref : 'content' } , router1 , router2 ) ;
655
+ return div ( { ref : 'content' } , router1 , router2 ) ;
655
656
}
656
657
} ) ;
657
658
@@ -795,7 +796,7 @@ describe('Contextual Hash routers', function() {
795
796
var SubCat = React . createClass ( {
796
797
797
798
render : function ( ) {
798
- return React . DOM . div ( null ,
799
+ return div ( null ,
799
800
Router . Locations ( { ref : 'router' , contextual : true } ,
800
801
Router . Location ( {
801
802
path : '/' ,
0 commit comments