I'm using jQuery file upload plugin for managing image file uploads. What will be the right way to test image submission with Jasmine.
I would take a look at using the helper library Sinon.js. You can mock the XMLHttpRequest object to intercept the post request, and verify that your plugin code is submitting images correctly. In particular, take a look at this part of the Sinon.js documentation:
http://sinonjs.org/docs/#server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With