Trying to create unit test cases for a web API call.
This one showcases success: Success Unit Test (jsfiddle)
getProduct("jsonp","https://maps.googleapis.com/maps/api/e
Here is an example of an error, but the test result still shows "pass": Error Unit Test (jsfiddle)
getProduct("jsonp","https://sdfsdfdfmaps.googleapis.com/maps/api/e
Correct web API URL: https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034&key
Incorrect web API URL:
The test passes even with the incorrect web API URL.