Getter for Should syntax now uses valueOf for primitives #379
While this PR doesn't fix a bug when Chai is used by itself, it does make it more compatible with babel and its core-js dependency (and possibly other ES6 transpilation tools).
The issue that led to this PR occurred when using the latest version of babel (and subsequently core-js). Our assertions involving Numbers would fail:
var test = 1; test.should.equal( 1 );
This would throw an error
After the update to babel and this error, we checked
I would be more than willing to attempt unit tests around how the existing implementation could break, but it is such an edge case and using
We just spent the weekend and last few days switching our projects over from