We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
renderSuspended
1 parent 8a6a052 commit 5b18911Copy full SHA for 5b18911
examples/app-vitest-full/nuxt.config.ts
@@ -1,5 +1,6 @@
1
// https://v3.nuxtjs.org/api/configuration/nuxt.config
2
export default defineNuxtConfig({
3
+ devtools: { enabled: true },
4
modules: ['@nuxt/test-utils/module', '~/modules/custom'],
5
vitest: {
6
startOnBoot: true,
src/runtime-utils/render.ts
@@ -71,6 +71,9 @@ export async function renderSuspended<T>(
71
const { vueApp } = globalThis.__unctx__.get('nuxt-app').tryUse()
72
const { render, setup } = component as DefineComponent<any, any>
73
74
+ // cleanup previously mounted test wrappers
75
+ document.querySelector(`#${WRAPPER_EL_ID}`)?.remove()
76
+
77
let setupContext: SetupContext
78
79
return new Promise<ReturnType<typeof renderFromTestingLibrary>>(resolve => {
0 commit comments