Closed ROMB closed 10 years ago
should.js unwrap all primitive type wrappers to their actual values. it is by design true.
But should thinks it's false. Try the test.
I know the test will fail. But test from should.js perspective is wrong.
From logical point of view, why you think we should not extract from Boolean its value?
because if(new Boolean(false)) will be true.
This is mistake that some one can make in javascript code if(Boolean(false)) - false if(new Boolean(false)) - true
This is must not be false, as result of new Boolean(false) is object.