You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.serial('Undo secondGroup and mutation without group', async t => {
await undo();
await undo();
t.deepEqual(Vue.plain(store.state.list), firstGroupItems);
});
Expected result: Both undo operations happening one after the other and the assertion matches
Actual result: The undo operations are intertwined (can be reproduced fairly consistently with node v10.6). As a result, some of the replayed mutations are actually registered as new mutations.
The most likely reason is the way the undo and redo operations are triggered which is done using the subscribeAction method on the Vuex store. However the time at which subscribeAction is called is not clearly defined (vuejs/vuex#1098) and the subscribe methods can not deal with asynchronous callbacks.
I am not sure how to fix this at the moment. But maybe you have an idea?
The text was updated successfully, but these errors were encountered:
Steps to reproduce: Use the test case from my branch https://github.com/nlochschmidt/undo-redo-vuex/blob/test-action-groups/test/test-action-group-undo.js and replace https://github.com/nlochschmidt/undo-redo-vuex/blob/b6786ea2298ab2eb2ef3e2ad20b34a7f62478009/test/test-action-group-undo.js#L74-L85 with
Expected result: Both undo operations happening one after the other and the assertion matches
Actual result: The undo operations are intertwined (can be reproduced fairly consistently with node v10.6). As a result, some of the replayed mutations are actually registered as new mutations.
The most likely reason is the way the undo and redo operations are triggered which is done using the
subscribeAction
method on the Vuex store. However the time at whichsubscribeAction
is called is not clearly defined (vuejs/vuex#1098) and the subscribe methods can not deal with asynchronous callbacks.I am not sure how to fix this at the moment. But maybe you have an idea?
The text was updated successfully, but these errors were encountered: