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.
0 Replies