diff options
author | Phil Hughes <me@iamphill.com> | 2018-03-29 10:43:32 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-29 10:44:38 +0100 |
commit | e26d20311cf8ef1a20a8973572e781bab76a0a5b (patch) | |
tree | 64262589f9cdc444e25e54798261d3c6a7f4f903 /spec/javascripts/helpers/vuex_action_helper.js | |
parent | 7fa7f3e326ac55c00f3d6fac1fd077c6b78ff769 (diff) | |
download | gitlab-ce-e26d20311cf8ef1a20a8973572e781bab76a0a5b.tar.gz |
fixed failinng tests after helper change
Diffstat (limited to 'spec/javascripts/helpers/vuex_action_helper.js')
-rw-r--r-- | spec/javascripts/helpers/vuex_action_helper.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/javascripts/helpers/vuex_action_helper.js b/spec/javascripts/helpers/vuex_action_helper.js index 05e7e9377c0..2b50af36df2 100644 --- a/spec/javascripts/helpers/vuex_action_helper.js +++ b/spec/javascripts/helpers/vuex_action_helper.js @@ -8,16 +8,13 @@ export default (action, payload, state, expectedMutations, done) => { let count = 0; // mock commit - const commit = (type, payload) => { + const commit = (type, mutationPayload) => { const mutation = expectedMutations[count]; - try { - expect(mutation.type).toEqual(type); - if (payload) { - expect(mutation.payload).toEqual(payload); - } - } catch (error) { - done.fail(error); + expect(mutation.type).toEqual(type); + + if (mutation.payload) { + expect(mutation.payload).toEqual(mutationPayload); } count++; |