'How can I use cypress to assert that an image is the correct one?

I'm trying to test a case where a user can insert a URL for their profile and want to make sure that the right image is loaded up. Is there a way where I can assert that the picture's src is the right one?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source