vuex-persist: Cannot run unit tests
I am attempting to use vue-test-utils
and jest
to run some unit tests on my vuex actions. I am running into the error below. Any ideas on how I can get this resolved?
FAIL test/unit/specs/masternode/Provision.spec.js
● Test suite failed to run
TypeError: Cannot read property '_config' of undefined
at new VuexPersistence (node_modules/vuex-persist/dist/index.js:133:44)
at Object.<anonymous> (src/store/index.js:60:17)
at Object.<anonymous> (src/contracts/MNProposedMarket.js:19:14)
at Object.<anonymous> (src/store/modules/app/actions.js:35:25)
at Object.<anonymous> (src/store/modules/app/index.js:7:16)
at Object.<anonymous> (src/store/modules/index.js:7:12)
at Object.<anonymous> (test/unit/specs/masternode/Provision.spec.js:27:16)
Here is my spec so far:
describe('AppActions', () => {
const vuexLocal = new VuexPersist({
storage: window.localStorage,
modules: ['app', 'masternode', 'marketplace'],
})
let store
beforeEach(() => {
store = new VuexStore ({
plugins: [vuexLocal.plugin]
})
})
})
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 18 (7 by maintainers)
Sorry I had been really swamped by work. I’ll fix this, this week.
On Mon 23 Apr, 2018, 5:34 PM SkyzohKey, notifications@github.com wrote:
Thanks @championswimmer , I’ve tried v1.1.6 … original error disappeared, but a new one came up :