mardi 5 juillet 2016

How do you use google maps api with mocha testing since there is no html to add the script tag which google maps api requires

I am trying to test my react application using mocha. I am using google maps api in my application. When I run my mocha tests, I get an error "ReferenceError: google is not defined". In my application I can use the API since I include the following script tag in my html.

<script src="http://ift.tt/29vXHmq;.

Mocha runs on node.js and there is no html to it. How do I use google maps with my mocha testing?

Example usage:

const bounds = new google.maps.LatLngBounds(); 

Aucun commentaire:

Enregistrer un commentaire