davestewart / vuex-pathify

Vue / Vuex plugin providing a unified path syntax to Vuex stores
https://davestewart.github.io/vuex-pathify
MIT License
1.37k stars 57 forks source link

Unit tests #4

Closed GMaiolo closed 3 years ago

GMaiolo commented 6 years ago

Are unit tests in the roadmap?

davestewart commented 6 years ago

They sure are.

There's too much going on under the hood to remain untested!

Got any recommendations on testing frameworks / setup?

hlobil commented 6 years ago

I would recommend Jest ...

davestewart commented 6 years ago

Thanks, I'll look into that.

davestewart commented 6 years ago

Have started writing tests :)

imyjimmy commented 6 years ago

Hi Dave,

Any updates on this? Our team is having trouble accessing a mock store with pathify syntax in jest unit tests:

TypeError: wrapper.vm.$store.set is not a function > 109 | wrapper.vm.$store.set('activated/activeQpiCategoryList', ['1','2'])

We've made sure to include pathify in the mockStore (see gist) and we're using createStoreMocks, defined in our mockStore, in our spec (another gist)

Thanks,

Jimmy

davestewart commented 6 years ago

Hey Jimmy,

Actually, no, not started writing tests yet.

Let me look into this though. Do you think there's some way to change the setup of pathify to support tests (if it's not already?) ?

rumanHuq commented 5 years ago

A boilerplate of how to test vuex-component would be great when vuex-pathify is enabled!