-
Notifications
You must be signed in to change notification settings - Fork 126
rollup superagent breaks tests #56
Comments
Can you provide either a repository that exhibits this behavior or an example on http://rollupjs.org? |
Okay, it took me a while to see the problem, but it seems that this plugin is clobbering globals. Your var requestBase = __commonjs(function (module, exports) {
// https://github.com/visionmedia/superagent/blob/93b060790e78b6ca088aec57cb3168ee5e248007/lib/request-base.js
exports.clearTimeout = function _clearTimeout(){
this._timeout = 0;
clearTimeout(this._timer);
return this;
};
});
export default (requestBase && typeof requestBase === 'object' && 'default' in requestBase ? requestBase['default'] : requestBase);
export var clearTimeout = requestBase.clearTimeout; That's not correct since it is creating a local binding for var requestBase = __commonjs(function (module, exports) {
// https://github.com/visionmedia/superagent/blob/93b060790e78b6ca088aec57cb3168ee5e248007/lib/request-base.js
exports.clearTimeout = function _clearTimeout(){
this._timeout = 0;
clearTimeout(this._timer);
return this;
};
});
export default (requestBase && typeof requestBase === 'object' && 'default' in requestBase ? requestBase['default'] : requestBase);
var clearTimeout$1 = requestBase.clearTimeout;
export { clearTimeout$1 as clearTimeout }; |
@eventualbuddha having the same issue here.... @leeyeh are you using the |
@dtothefp Yes. |
Upgrading superagent to version 1.8 broke the tests of my app.
related change:
https://github.com/visionmedia/superagent/blob/93b060790e78b6ca088aec57cb3168ee5e248007/lib/request-base.js#L12-L16
which was rolled up to:
The text was updated successfully, but these errors were encountered: