score:1

Accepted answer

the mock that you are creating is not really returning anything. you should return a url so that the components get's an imageurl and is then able to show the <img /> element.

global.url.createobjecturl = jest.fn().mockreturnvalueonce('https://www.samplerandomdomain.com/images/123.jpg');

Related Query

More Query from same tag