-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Server #13
Test Server #13
Conversation
ok(true) | ||
start() | ||
}) | ||
}) |
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.
Not sure how to test the network error.
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.
Well, I guess we can hit example.com
which should fail.
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.
Can you have another server that listens on a particular port and just closes whatever connection it receives (or sends garbage or something)?
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.
O, hmm, I wonder if we can prematurely close the node http res
stream and cause the error.
@dgraham think I figured out the test hang and why we saw it on that other project ;) ;). It looks like phantomjs doesn't support I'm also wondering what the polyfill should do in general if Blobs are unavailable. |
CI build https://travis-ci.org/github/fetch/builds/38111889 GH build statuses don't seem to be working. |
Oh, that makes sense. We've had to polyfill other API for phantomjs because it's so old. |
}, | ||
'/error': function(res) { | ||
res.destroy(); | ||
}, |
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.
@aroben this worked well for killing the tcp connection.
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.
Nice
I think we have two choices for the blob body promise:
reject(new TypeError('Blob is not supported in this browser')) |
I'd imagine that a browser that implements fetch but doesn't support Blob would leave response.blob (the function itself) undefined. Maybe we can do that? |
WIP
Closes #6.