From f2debcf7133a5885b3ce33ab42f63079e3ef0574 Mon Sep 17 00:00:00 2001 From: Jokcy Date: Thu, 8 Dec 2016 10:44:19 +0800 Subject: [PATCH] Update testing.md commit to trigger a mutation not dispatch --- docs/en/testing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/testing.md b/docs/en/testing.md index 55098ca18..9bb0e73ad 100644 --- a/docs/en/testing.md +++ b/docs/en/testing.md @@ -57,10 +57,10 @@ Example testing an async action: // actions.js import shop from '../api/shop' -export const getAllProducts = ({ dispatch }) => { - dispatch('REQUEST_PRODUCTS') +export const getAllProducts = ({ commit }) => { + commit('REQUEST_PRODUCTS') shop.getProducts(products => { - dispatch('RECEIVE_PRODUCTS', products) + commit('RECEIVE_PRODUCTS', products) }) } ```