Giorgio Polvara
Giorgio Polvara
I did not unfortunately
Any update on this one?
For those that are trying to mock API responses, this seems to be working for now: ```tsx test("should do stuff", async () => { global.fetch = jest.fn().mockResolvedValue({ json: jest.fn().mockResolvedValue({ login:...
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 with all nested layouts...
> > 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...
> 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. Say you want to...
I agree, I'll open an issue in Next's repo
FYI request for a testing method in Next https://github.com/vercel/next.js/discussions/50479
Probably the repo needs some automated testing for these kinds of situations