pretenderjs / FakeXMLHttpRequest

A fake XMLHttpRequest object for testing in browsers
MIT License
65 stars 46 forks source link

alias responseText to response #53

Closed kellyselden closed 4 years ago

kellyselden commented 5 years ago

I'm dealing with a situation where switching to pretender is causing Three.js's file loading to fail. They assume the request has both a responseText and a response property.

Screenshot 2019-11-06 at 16 21 32

Here is the offending code https://github.com/mrdoob/three.js/blob/6fcaa8ef3dac2640a88901f2efd37d42acb82b7c/src/loaders/FileLoader.js#L173.

kellyselden commented 5 years ago

I would have used

get response() {
  return this.responseText;
}

but I didn't know how new of code you are targetting.

ViktorSoroka07 commented 4 years ago

Seems like this one causes #54. Please take a look.