jameslnewell / xhr-mock

Utility for mocking XMLHttpRequest.
196 stars 48 forks source link

"Request has been terminated" error with superagent #14

Closed donaldpipowitch closed 8 years ago

donaldpipowitch commented 8 years ago

The errors is explained with Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc..

I tried .header('Access-Control-Allow-Origin', '*'), but the error remains. Any idea what I could do next?

donaldpipowitch commented 8 years ago

It looks like this was thrown because superagent called an URL which wasn't mocked.