diff --git a/examples/app-vitest-full/tests/nuxt/index.spec.ts b/examples/app-vitest-full/tests/nuxt/index.spec.ts index 63299b500..b743f6675 100644 --- a/examples/app-vitest-full/tests/nuxt/index.spec.ts +++ b/examples/app-vitest-full/tests/nuxt/index.spec.ts @@ -42,21 +42,8 @@ describe('client-side nuxt features', () => { it('allows pushing to other pages', async () => { await navigateTo('/something') expect(useNuxtApp().$router.currentRoute.value.path).toEqual('/something') - // It takes a few ticks for the Nuxt useRoute to be updated (as, after suspense resolves, - // we wait for a final hook and then update the injected route object ) - const route = useRoute() - await new Promise(resolve => { - const unsub = watch( - () => route.path, - path => { - if (path === '/something') { - unsub() - resolve() - } - } - ) - }) - expect(route.path).toEqual('/something') + await nextTick() + expect(useRoute().path).toEqual('/something') }) })