node-source-map-support icon indicating copy to clipboard operation
node-source-map-support copied to clipboard

Should globals be saved during installation?

Open bsuh opened this issue 7 years ago • 0 comments

I think source-map-support is most frequently used in testing and I just ran into an issue where I was using sinon to set up a mock HTTP server during a test. If that test threw an exception, sinon would try to use XMLHTTPRequest to fetch the file / source map against the mock HTTP server, receive a 404, and fail to translate the stack trace. I think it may make sense to save globals like XMLHTTPRequest during installation so that even if they are mocked, source-map-support can use the original.

bsuh avatar Jan 03 '18 11:01 bsuh