Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use valueOf(); fixes test cases on node v0.7.7 #56

Merged
merged 3 commits into from Mar 31, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/should.js
Expand Up @@ -78,7 +78,7 @@ exports.not.exist = function(obj, msg){
Object.defineProperty(Object.prototype, 'should', {
set: function(){},
get: function(){
return new Assertion(this);
return new Assertion(Object(this).valueOf());
},
configurable: true
});
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -5,9 +5,8 @@
, "contributors": [ "Aseem Kishore <aseem.kishore@gmail.com>" ]
, "devDependencies": {
"mocha": "*"
, "should": "*"
}
, "keywords": ["test", "bdd", "assert"]
, "main": "./lib/should.js"
, "engines": { "node": ">= 0.2.0" }
}
}
2 changes: 1 addition & 1 deletion test/should.test.js
Expand Up @@ -21,7 +21,7 @@ module.exports = {
},

'test double require': function(){
require('should').should.equal(should);
require('../').should.equal(should);
},

'test assertion': function(){
Expand Down