Using Chai or mocha, how can I see whether an image exists. For example, https://upload.wikimedia.org/wikipedia/commons/5/51/Google.png
Asked
Active
Viewed 876 times
-1
-
2Can you expand on what do you mean by exists? – Geraint May 01 '18 at 01:19
-
I'm assuming you are writing a test and want to assert that something happens with an image? – AfDev May 01 '18 at 01:22
-
I expect the test to return 200 or status ok – Brenda Olivia Martis May 01 '18 at 01:24
-
hm, are you trying to test something like cdn assets? – Dayan Moreno Leon May 01 '18 at 01:46
-
1Possible duplicate of [check-if-image-exists-on-server-using-javascript](https://stackoverflow.com/questions/18837735/check-if-image-exists-on-server-using-javascript) – Pedro A May 01 '18 at 02:01
-
I am trying to test images on my website which has a URL. – Brenda Olivia Martis May 01 '18 at 04:24
-
1I don't think it's a duplicate of the above mentioned link. They haven't used any testing framework there. – Brenda Olivia Martis May 01 '18 at 18:33