How to use with Nuxt.js
See original GitHub issueHello!
I’m trying to use vue-testing-library
with Nuxt.js and I’m facing a problem with asyncData
not being called.
I’ve been reading for a while, and some people call wrapper.vm.$options.asyncData()
manually, but that feels super dirty to me, also I don’t think vm
is available in vue-testing-library
Any idea of how can I do it? I ran out of ideas to be honest.
I’ve seen @afontcu post about testing api calls but it uses the created
life cycle method
Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Nuxt - The Intuitive Vue Framework
Build your next Vue.js application with confidence using Nuxt. An open source framework making web development simple and powerful.
Read more >What is Nuxt.js? - Vue School
Nuxt.js is a framework for creating Vue.js applications. Its goal is to help Vue developers take advantage of top-notch technologies, fast, easy and...
Read more >What Is Nuxt.js? Learn More About the Intuitive Vue Framework
Nuxt.js is a server-side rendering framework built on Vue.js. It abstracts away most of the complex configuration involved in managing ...
Read more >Nuxt.js: a Minimalist Framework for Creating Universal Vue.js ...
Simply put, Nuxt.js is a framework that helps you build server-rendered Vue.js applications easily. It abstracts most of the complex ...
Read more >Free Nuxt.js Tutorial — Vue Mastery Course - Medium
In this Nuxt tutorial, a free lesson from the Vue Mastery course, we'll build an application together and learn about the folder structure ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s what I’ve used:
test/nuxtMountUtils.js
Example Usage
i did this and it kind of works… but is there a better solution now?