Skip to content

Commit

Permalink
test(#45): export factory for new store with exposed done/undone stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbeng89 committed Sep 28, 2020
1 parent 5f3af55 commit 0f4e6e8
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions tests/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ Vue.use(Vuex);

const debug = process.env.NODE_ENV !== "production";

const listUndoRedoConfig = {
namespace: "list",
ignoreMutations: ["addShadow", "removeShadow"]
};

export const store = {
plugins: [
undoRedo({
paths: [
{
namespace: "list",
ignoreMutations: ["addShadow", "removeShadow"],
exposeUndoRedoConfig: true
}
]
paths: [listUndoRedoConfig]
})
],
modules: {
Expand All @@ -27,6 +26,26 @@ export const store = {
strict: debug
};

export const getExposedConfigStore = () => {
return new Vuex.Store({
plugins: [
undoRedo({
paths: [
{
...listUndoRedoConfig,
exposeUndoRedoConfig: true
}
]
})
],
modules: {
list,
auth
},
strict: false
})
};

export default new Vuex.Store({
...store,
strict: false
Expand Down

0 comments on commit 0f4e6e8

Please sign in to comment.