@@ -22,12 +22,16 @@ describe('Navigation', function () {
22
22
var component ;
23
23
beforeEach ( function ( done ) {
24
24
component = ReactTestUtils . renderIntoDocument (
25
- Routes ( { location : 'none' } ,
25
+ Routes ( { location : 'none' , onChange : done } ,
26
26
Route ( { name : 'home' , path : '/:username/home' , handler : NavigationHandler } )
27
27
)
28
28
) ;
29
29
30
- component . dispatch ( '/anybody/home' , done ) ;
30
+ component . dispatch ( '/anybody/home' , function ( error , abortReason , nextState ) {
31
+ expect ( error ) . toBe ( null ) ;
32
+ expect ( abortReason ) . toBe ( null ) ;
33
+ component . setState ( nextState , done ) ;
34
+ } ) ;
31
35
} ) ;
32
36
33
37
afterEach ( function ( ) {
@@ -50,7 +54,11 @@ describe('Navigation', function () {
50
54
)
51
55
) ;
52
56
53
- component . dispatch ( '/home' , done ) ;
57
+ component . dispatch ( '/home' , function ( error , abortReason , nextState ) {
58
+ expect ( error ) . toBe ( null ) ;
59
+ expect ( abortReason ) . toBe ( null ) ;
60
+ component . setState ( nextState , done ) ;
61
+ } ) ;
54
62
} ) ;
55
63
56
64
afterEach ( function ( ) {
@@ -78,7 +86,11 @@ describe('Navigation', function () {
78
86
)
79
87
) ;
80
88
81
- component . dispatch ( '/home' , done ) ;
89
+ component . dispatch ( '/home' , function ( error , abortReason , nextState ) {
90
+ expect ( error ) . toBe ( null ) ;
91
+ expect ( abortReason ) . toBe ( null ) ;
92
+ component . setState ( nextState , done ) ;
93
+ } ) ;
82
94
} ) ;
83
95
84
96
afterEach ( function ( ) {
@@ -101,7 +113,11 @@ describe('Navigation', function () {
101
113
)
102
114
) ;
103
115
104
- component . dispatch ( '/home' , done ) ;
116
+ component . dispatch ( '/home' , function ( error , abortReason , nextState ) {
117
+ expect ( error ) . toBe ( null ) ;
118
+ expect ( abortReason ) . toBe ( null ) ;
119
+ component . setState ( nextState , done ) ;
120
+ } ) ;
105
121
} ) ;
106
122
107
123
afterEach ( function ( ) {
0 commit comments