Closed christophercliff closed 9 years ago
I does not reproduced this. I created simple html file with only should.js script included (from repo root) and in developer tools your examples working just fine. I need more details if you need help.
I put together a test case:
$ git clone git@github.com:christophercliff/should.js.git
$ cd ./should.js
$ git fetch
$ get checkout example-error
$ sudo npm install
$ grunt test
This will create a test runner at http://127.0.0.1:8000/. Just open it in Internet Explorer 9 (I'm using the IE9 - Win7 VM from modern.ie).
Thanks, for detailed test case. I reproduced issue with win7 and ie9. There what i found: when ie9 should box number value and call getter it set wrong value.
//i added such getter
Object.defineProperty(Object.prototype, 'test', {
get: function() { return this; }
});
//and when i tun
(100).test // return 0
Looks like it is ie bug, but I will look on this more.
Hi again. I looked very attentively on this issue and tried several ways to find workaround for this issue, but i failed in this. I created wiki page with known bugs and add this page ref to readme. I will rest this issue opened, as it is bug and nobody recreate it (as by my observation nobody check closed bugs).
As a single workaround, as you mention - need to use not a getter but a function call.
Built with
grunt-browserify
, the following failsAssertionError: expected {} to be 2
:The following runs successfully: