I am currently testing document printing on client side with jest (so test env is js-dom). And I stumbled upon error with lambda that is passed to template. Heres the example of my code:
const data = {
...someFields,
someField: () => (text, render) => functionThatParsesText(render(text)),
};
And jest throws error:
TypeError: render is not a function
Is it because Jest tries to call for a function in this code? If thats so, how can it be prevented?