node-source-map-support
node-source-map-support copied to clipboard
Should globals be saved during installation?
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.