Added missing ajax unit tests

This commit is contained in:
Eliot Berriot 2018-01-11 23:02:45 +01:00
parent 736caa399a
commit 90611ffacc
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
3 changed files with 95 additions and 4 deletions

View file

@ -66,8 +66,8 @@ export const testAction = ({action, payload, params, expectedMutations, expected
// call the action with mocked store and arguments
let promise = action({ commit, dispatch, ...params }, payload)
if (promise) {
promise.then(end)
return promise.then(end)
} else {
end()
return end()
}
}