mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 04:39:25 +02:00
Added missing ajax unit tests
This commit is contained in:
parent
736caa399a
commit
90611ffacc
3 changed files with 95 additions and 4 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue