@nuxt/test-utils vs @vue/test-utils?
See original GitHub issueIt would be really good to know why using @nuxt/test-utils is more beneficial than using @vue/test-utils in a Nuxt project. Despite the obvious point being this package is made specifically for Nuxt, @vue/test-utils still works perfectly well in Nuxt projects.
Could we get some comparison docs (a table maybe) of what @vue/test-utils can’t do for a Nuxt project, but @nuxt/test-utils can?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Introduction to Nuxt Test Utils - Reflect.run
Nuxt is a free and open-source JavaScript library built upon Vue that allows you to develop server-rendered web applications. Nuxt Test ...
Read more >Component testing in Nuxt.js with Jest - LogRocket Blog
Set up a game store application with the Nuxt.js framework and test its components. We'll also explore Vuetify and Vuex.
Read more >Guides | Vue Test Utils
Vue Test Utils (VTU) is a set of utility functions aimed to simplify testing Vue.js components. It provides some methods to mount and...
Read more >Testing · Get Started with Nuxt
Under the hood, Nuxt test utils uses playwright to carry out browser testing. If this option is set, a browser will be launched...
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 Free
Top 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

These are two different tools. For the best result use them both.
If we talk about Nuxt apps,
@nuxt/test-utilswill build an app (or generate a website), launch a server and will provide a browser (all are optional). For example,@nuxt/test-utilsmight help to check if Nuxt routes, middleware, modules, etc work and if pages are rendered as expected. Public API:get(),url(),createPage(),getNuxt(), etc. Focus on routes, browsing and Nuxt instance, but not Vue components.We have
@vue/test-utilsto test Vue components (or Vue app). Public API:mount(),shallowMount(),render(),renderToString(), etc.@vue/test-utilsdoes not build Nuxt apps and knows nothing about Nuxt instance.(Some details might be missing, but this should help to catch general idea.)
@MentalGear as mentioned before, I don’t know how exactly Sentry works. Here are simply few thoughts which might help you to find a solution.
Your question made me curious to take look at
sentry-module’s docs and test suite. A snipped bellow is adapted from examples found there. Docs mentionclientIntegrationsoption. If I get it right, this options setslogErrors: truein dev. Make it log errors in test mode too and usepage.on('console')andpage.on('pageerror')methods of Playwright’sPageclass.