@@ -86,7 +86,7 @@ const actions = actionsInjector({
86
86
})
87
87
88
88
// helper for testing action with expected mutations
89
- const testAction = (action , args , state , expectedMutations , done ) => {
89
+ const testAction = (action , payload , state , expectedMutations , done ) => {
90
90
let count = 0
91
91
92
92
// mock commit
@@ -103,7 +103,7 @@ const testAction = (action, args, state, expectedMutations, done) => {
103
103
}
104
104
105
105
// call the action with mocked store and arguments
106
- action ({ commit, state }, ... args )
106
+ action ({ commit, state }, payload )
107
107
108
108
// check if no mutations should have been dispatched
109
109
if (expectedMutations .length === 0 ) {
@@ -114,7 +114,7 @@ const testAction = (action, args, state, expectedMutations, done) => {
114
114
115
115
describe (' actions' , () => {
116
116
it (' getAllProducts' , done => {
117
- testAction (actions .getAllProducts , [] , {}, [
117
+ testAction (actions .getAllProducts , null , {}, [
118
118
{ type: ' REQUEST_PRODUCTS' },
119
119
{ type: ' RECEIVE_PRODUCTS' , payload: { /* mocked response */ } }
120
120
], done)
0 commit comments