@@ -55,16 +55,20 @@ module.exports = function createTests(createHistory, name, reset = defaultReset)
55
55
it ( 'creates actions' , ( ) => {
56
56
expect ( push ( '/foo' ) ) . toEqual ( {
57
57
type : TRANSITION ,
58
- method : 'push' ,
59
- arg : '/foo'
58
+ payload : {
59
+ method : 'push' ,
60
+ arg : '/foo'
61
+ }
60
62
} )
61
63
62
64
expect ( push ( { pathname : '/foo' , state : { the : 'state' } } ) ) . toEqual ( {
63
65
type : TRANSITION ,
64
- method : 'push' ,
65
- arg : {
66
- pathname : '/foo' ,
67
- state : { the : 'state' }
66
+ payload : {
67
+ method : 'push' ,
68
+ arg : {
69
+ pathname : '/foo' ,
70
+ state : { the : 'state' }
71
+ }
68
72
}
69
73
} )
70
74
} )
@@ -74,16 +78,20 @@ module.exports = function createTests(createHistory, name, reset = defaultReset)
74
78
it ( 'creates actions' , ( ) => {
75
79
expect ( replace ( '/foo' ) ) . toEqual ( {
76
80
type : TRANSITION ,
77
- method : 'replace' ,
78
- arg : '/foo'
81
+ payload : {
82
+ method : 'replace' ,
83
+ arg : '/foo'
84
+ }
79
85
} )
80
86
81
87
expect ( replace ( { pathname : '/foo' , state : { the : 'state' } } ) ) . toEqual ( {
82
88
type : TRANSITION ,
83
- method : 'replace' ,
84
- arg : {
85
- pathname : '/foo' ,
86
- state : { the : 'state' }
89
+ payload : {
90
+ method : 'replace' ,
91
+ arg : {
92
+ pathname : '/foo' ,
93
+ state : { the : 'state' }
94
+ }
87
95
}
88
96
} )
89
97
} )
@@ -93,8 +101,10 @@ module.exports = function createTests(createHistory, name, reset = defaultReset)
93
101
it ( 'creates actions' , ( ) => {
94
102
expect ( go ( 1 ) ) . toEqual ( {
95
103
type : TRANSITION ,
96
- method : 'go' ,
97
- arg : 1
104
+ payload : {
105
+ method : 'go' ,
106
+ arg : 1
107
+ }
98
108
} )
99
109
} )
100
110
} )
@@ -103,8 +113,10 @@ module.exports = function createTests(createHistory, name, reset = defaultReset)
103
113
it ( 'creates actions' , ( ) => {
104
114
expect ( goBack ( ) ) . toEqual ( {
105
115
type : TRANSITION ,
106
- method : 'goBack' ,
107
- arg : undefined
116
+ payload : {
117
+ method : 'goBack' ,
118
+ arg : undefined
119
+ }
108
120
} )
109
121
} )
110
122
} )
@@ -113,8 +125,10 @@ module.exports = function createTests(createHistory, name, reset = defaultReset)
113
125
it ( 'creates actions' , ( ) => {
114
126
expect ( goForward ( ) ) . toEqual ( {
115
127
type : TRANSITION ,
116
- method : 'goForward' ,
117
- arg : undefined
128
+ payload : {
129
+ method : 'goForward' ,
130
+ arg : undefined
131
+ }
118
132
} )
119
133
} )
120
134
} )
@@ -132,7 +146,7 @@ module.exports = function createTests(createHistory, name, reset = defaultReset)
132
146
it ( 'updates the path' , ( ) => {
133
147
expect ( routeReducer ( state , {
134
148
type : UPDATE_LOCATION ,
135
- location : {
149
+ payload : {
136
150
path : '/bar' ,
137
151
action : 'PUSH'
138
152
}
@@ -147,7 +161,7 @@ module.exports = function createTests(createHistory, name, reset = defaultReset)
147
161
it ( 'respects replace' , ( ) => {
148
162
expect ( routeReducer ( state , {
149
163
type : UPDATE_LOCATION ,
150
- location : {
164
+ payload : {
151
165
path : '/bar' ,
152
166
action : 'REPLACE'
153
167
}
0 commit comments