Created
January 8, 2015 20:19
-
-
Save declank/d19b0660e91dd4e4f088 to your computer and use it in GitHub Desktop.
Using the Google Client APIs for JavaScript (GAPI) with Mocha Test Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var handleClientLoad = function() { | |
gapi.client.setApiKey(API_KEY_GOES_HERE); | |
}; | |
var googleApiScriptTag = document.createElement('script'); | |
googleApiScriptTag.src = "https://apis.google.com/js/client.js?onload=handleClientLoad"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(googleApiScriptTag, firstScriptTag); | |
mocha.checkLeaks(); | |
mocha.globals(['jQuery', 'gapi', '___jsl', 'osapi', 'iframer', 'gadgets', 'shindig', 'pos', 'googleapis', | |
'ToolbarApi', 'iframes', 'IframeBase', 'Iframe', 'IframeProxy', 'IframeWindow', '__gapi_jstiming__']); | |
mocha.run(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment