Closed sebakerckhof closed 6 years ago
ping @hwillson
Actually, I missed one deprecation, gonna do a quick follow-up PR. And in the meantime sinon 6 came out (without breaking changes), but I'll give it a quick test anyway.
Awesome @sebakerckhof - thanks!
@hwillson . I opened a new one: https://github.com/hwillson/meteor-stub-collections/pull/31
This PR updates sinon. It's kind of hard to explain why it's important, but I'll give it a try:
My first test was timing out when calling the
stub
function of this library. I found out that this was happening when I had a lot of test files. My investigation revealed thatstub
method in this library calls the sinon 4 stub function.source-map-support
npm package ( https://github.com/evanw/node-source-map-support ) which will change the error stack to map to the original files.This can be seen in the attached performance profile ( between 1100ms-1250ms)
sourcemaps - CPU-20180531T160228.zip
Sinon 5 no longer creates this stack trace in the
wrapMethod
function: https://github.com/sinonjs/sinon/blob/master/lib/sinon/util/core/wrap-method.js#L110Oh and interestingly enough. The slow piece of code (SourceMapConsumer) that resulted in this timeout is exactly what is being replaced by WASM, which you started working on https://github.com/meteor/meteor/issues/9568#issuecomment-359930688 . So if we can upgrade to
source-map
v0.7, we can probably also upgrade meteor'ssource-map-support
package and avoid such issues in the first place.