Nicky McCurdy
Nicky McCurdy
> A friend came up with the following: > > ```ts > const props = { > params: { surveyType: '123' }, > searchParams: { journeyId: '456' }, > }...
We could document using layouts similarly to how we already document using providers: by importing them and passing them as the `wrapper` option of `render`. ```js import {render} from '@testing-library/react'...
I'm doing more research into RSCs using Next, and I noticed some mistaken assumptions I had: 1. Determining if a component uses suspense is not possible due to the [halting...
> I agree we should ask Next to provide an API. I'm thinking something like this: > > ```tsx > const RSC = routeComponent('/some/path') // This will return an RSC...
For anyone that wants to help, I'm trying to figure out why I can't hydrate into a server rendered document, it's like it's destroying the whole document. https://gist.github.com/nickmccurdy/a5797bec9bb7e1156f814846c9bcb04b https://github.com/nickmccurdy/rsc-testing
I'd rather not add APIs specific to bundlers, especially since Next has already moved to other bundlers and we still have others to support in the future.
Thanks for the branch, that's interesting. I'd still like to understand why this works and `onAllReady` doesn't though, as that's supposed to be used for SSG where having suspense fallbacks...
That's closer to what I was thinking originally. Though, I think I'm confused about how this is working, but I'll reply here again when I resolve it.
I'm not sure we need it to return params, since you can just choose what params to render in your test by changing the URL.
> If we want to keep the `render()` format rather than `render(Component)` `Component` could just render the tree passing the correct `params`. @Gpx Yes, I think that's simpler, and I'd...