Jest error with conditions on props.
I am trying to test if layout.js if it calles a fetch service, this works. But in layout.js, page.js is rendered and my fetched data is added as a prop. I mock the service an data and I return []. But in page.js I only show the data when it is not empty but I keep getting an error when using this condition. I've already tried with returning just random types and random conditions like strings but it doesn't help. I am using jest for the testing in Next.js.
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1185607510699290634/image.png)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1185607511001288734/image.png)
0 Replies