-
Notifications
You must be signed in to change notification settings - Fork 158
Description
Thank you for the excellent guide, it's been instrumental in learning how to test! :)
I'm wondering about passing the vuex store as an option to the mount functions. I can't seem to find where it's documented in the official vue-test-utils docs. Those only mention a context object being used solely for functional components. I dug through the source code as much as I could (mostly using find) to look for instances of the options to try and track down how store is converted to context.
I would have posted on the test utils gh, but figured since I got the idea here, and it seems you may have answered on there anyway... My test works, took a while to figure out how to modify the store using a create mocks function, partially from your guide, partially from an idea I got from markus oberlehner and implemented in store and test. Passing the custom mocks through to the store stopped errors from appearing in console and I think I understand why. Just looking to further my understanding in any way.
I really appreciate the thought exercises you left, and you mentioned contributing to the guide. While I'm mostly a noob, I am eager to help in any way. If you think this factory function to create mock stores would be a useful contib I would be happy to help implement it in the docs. Also, there's an open issue for Spanish translation. I have worked as a translator in the past. Always did my work manually (w/o MT) and have been looking forward to applying newly learned tech skills in that arena. To start with, I want to be able to at least have my own site translated hehe. I kinda wanted to make the purchase of some MT software and start playing with that. I understand the translation is on hold owing to the release of composition api. I wouldn't be able to look into the translations anyway until my testing phase is complete. Also would be kinda fun to try and do a collab translation but understand if that project is "fully staffed."
Thanks again!
Carlos
p.s. I look forward to the day I will apply markdown url syntax correctly in the first attempt XD