New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for XMLHttpRequest.upload to FakeXMLHttpRequest #334
Conversation
}, | ||
|
||
uploadProgress: function uploadProgress(progressEventRaw) { | ||
this.upload.dispatchEvent(new ProgressEvent('progress', progressEventRaw)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single quotes. Might want to use double-quotes as in the rest of the class.
Lookin' good! @mantoni any input on this before I merge? |
Nice work. I didn't know about upload progress yet. Looks good to me - go on and merge. |
Adding support for XMLHttpRequest.upload to FakeXMLHttpRequest
|
@meleyal True. Could you put it with a test case into a new pull request? |
Nope, I can confirm this as well, here's the error
|
I can take a look at this today, since it's my doing. What are the exact steps to reproduce? |
I'm not getting an exception with: npm test or with, http://localhost:8080/test/sinon.html What environment (and/or browser) are you running the test suite within? |
I'm running it with PhantomJS, here's the AngularJS service + it's tests, in case you need to reproduce the issue: https://gist.github.com/carmivore/980bb3cf098f686985fd |
I just released 1.8.2 which fixes this issue. It was a matter of a missing feature test. |
Thanks! |
* get rid of the polyfill need back then. See: sinonjs/sinon#185 sinonjs/sinon#334 Note that built-in Sinon FakeXMLHttpRequest returns one more event per 200 what leds to different event array indexing that got fixed in the corresponding test.
I've added support for HTML 5 upload events to the FakeXMLHttpRequest. Here's an issue requesting/discussing functionality:
#185
Please let me know if there are any changes I can make, to get you pumped about pulling this in 馃憤
Reading