giphy-api
giphy-api copied to clipboard
Browser tests
With the newly implemented browser bundling, we should introduce a web testing framework (perhaps phantomjs).
@mattbierner I haven't published my changes yet, but I added browser support to this module. Do you mind testing it with your use case?
My use case of the Giphy api is pretty simple: just the search api with the public key (example project). The project is also using webpack for building, so it may not be the use case you are targeting.
I did install the latest bits though and confirmed they still work fine with webpack. You can also include dist/bundle.js
using webpack, but webpack complains about using a generated source file.
To tests things more directly, I also tried using the bundle.js
file with a <script src="giphy-api/dist/bundle.js"></script>
, but had to rebuild the bundle with a global export: ./node_modules/browserify/bin/cmd.js index.js -s giphy > dist/bundle.js
to allow using window.giphy
from my project. After that, everything worked fine.
Again, not sure how useful that is beyond confirming that the basic functionality still works. Please let me know if any other info would be helpful.
Thanks for taking a look. I added --standalone GiphyAPI
to the build script and published 1.2.0.