montagejs / collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
http://www.collectionsjs.com
Other
2.09k stars 185 forks source link

Mocha tests failing @ _map return this.size #224

Open ericuldall opened 5 years ago

ericuldall commented 5 years ago

It seems there has been some recent update that is breaking unit tests across many of our repos with the same error.

/srv/node_modules/collections/_map.js:162
            return this.size;
                        ^

TypeError: Method get Map.prototype.size called on incompatible receiver #<Map>

Any idea why we're seeing this and how we can fix it?

marchant commented 5 years ago

That file was last changed on Jun 17, 2016, not sure why this would come up now, let us know what you find out.

ericuldall commented 5 years ago

Okay, that is strange as we haven't made any changes to anything in our repos either.

ericuldall commented 5 years ago

Okay, we found the issue is related to an update in @sinonjs/commons. Closing this and will open a ticket there.

ericuldall commented 5 years ago

Here's the response from sinon, saying the problem may be how collections extends their object: https://github.com/sinonjs/commons/issues/18

Any thoughts on this?

nickyang07 commented 4 years ago

Having the same issue with jest. Any thoughts?