mardi 17 octobre 2017

JavaScript Test URL returns data

I would like to "test" an array of urls using javascript within a browser. I wish to check that the urls are (valid) and return some 'data' (i.e don't return an error code, nothing, or empty json array.. ). The end result will be a list of urls colored red (valid) green (ok) or orange (returned no data).

Can anyone suggest the best way to do this i.e using promises, some assertion or unit testing framework etc.

The urls will be resources (REST) on the same domain as the testing page.

thank you

Aucun commentaire:

Enregistrer un commentaire