Merge remote-tracking branch 'origin/develop' into feat/whatsapp-call-ui
This commit is contained in:
@@ -121,7 +121,7 @@ export const actions = {
|
||||
commit(types.default.SET_INTEGRATIONS_UI_FLAG, { isCreatingHook: false });
|
||||
} catch (error) {
|
||||
commit(types.default.SET_INTEGRATIONS_UI_FLAG, { isCreatingHook: false });
|
||||
throw new Error(error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
deleteHook: async ({ commit }, { appId, hookId }) => {
|
||||
|
||||
@@ -105,7 +105,9 @@ describe('#actions', () => {
|
||||
});
|
||||
it('sends correct actions if API is error', async () => {
|
||||
axios.post.mockRejectedValue(errorMessage);
|
||||
await expect(actions.createHook({ commit })).rejects.toThrow(Error);
|
||||
await expect(actions.createHook({ commit })).rejects.toEqual(
|
||||
errorMessage
|
||||
);
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.SET_INTEGRATIONS_UI_FLAG, { isCreatingHook: true }],
|
||||
[types.SET_INTEGRATIONS_UI_FLAG, { isCreatingHook: false }],
|
||||
|
||||
Reference in New Issue
Block a user