Mock out Google Maps Geocoder with Jasmine Spies
The Google Maps Geocoder is a handy utility that lets you do this:
var geocoder = new google.maps.Geocoder();
geocoder.geocode(
{ address: '1600 Amphitheatre Parkway, Mountain View, CA 94043' },
function (results) {
// address results of Google HQ
},
);
When writing unit tests though, we don't really want…