VUEX-TEST-UTILS
Simplify vuex tests
const initialState = foo: 'bar' const gettersMock = test: true test: fase const action = const dispatch getMutations reset = const result = const mutations = // use your custom assert t
API
method | Desc |
---|---|
testAction(state ? Object) => store | Returns an instance of the configured mock store |
store.dispatch(action, ...args) => action: Any | Dispatches an action through the mock store. The action will be stored in an array inside the instance and executed |
store.getMutations() => mutations: Array | Returns all mutations |
store.reset() => mutations: Array | Clear all mutations |
TODO
Actually it's really naive, vuex api is not fully respected
getters ({ state, getters, rootState })
dispatch ({ commit, dispatch, getters, rootGetters, rootState, state })
subscribe(handler)