I'm looking for a way to easily test my Nuxt.js app. I want to just test the entire app by accessing page by page and check that it contains the expected text or HTML elements. I tried with jest
but configuring it is a mess and at some point I get errors like:
[Vue warn]: Error in render: "TypeError: Cannot read property 'state' of undefined"
because I guess that I need to mock my stores and I would like to avoid that and searching for an automated and self-configured way to execute just functional tests, so at the end to simulate navigating my app like a user would do in the browser (but at the same time I would like to avoid using automated tools like puppeteer
and similar).
What options do I have? Would @nuxt/test-utils be useful for the purpose?
I tried to configure that too but I did not succeed (maybe a complete sample with code would be useful, but I could not find a real sample, most of them use @vue/test-utils
)!
Thanks
Aucun commentaire:
Enregistrer un commentaire