nuxt / test-utils

🧪 Test utilities for Nuxt
http://nuxt.com/docs/getting-started/testing
MIT License
323 stars 84 forks source link

feat(runtime-utils): expose setup context from `renderSuspended` result #852

Closed joaovitoras closed 6 months ago

joaovitoras commented 6 months ago

After a lot of internal testing in my private project and seeing some similar opened issues about the context returned by setup was not being accessible in the component, I saw that there was a difference in the way how mountSuspended and renderSuspended were defined.

In mountSuspended things always worked, looking at the difference between the two I ended up arriving at the PR https://github.com/danielroe/nuxt-vitest/pull/391 which introduced a fix for this, but only on the mountSuspended function

It would be cool at some point to unify what is possible in these two functions. There is a lot of duplicated logic between both

Fix: https://github.com/nuxt/test-utils/issues/722

joaovitoras commented 6 months ago

@danielroe This PR is ready! Can you review this or assign someone? I couldn't find contribution instructions for this repository and I don't know what steps to follow to get this work merged