tj / should.js

BDD style assertions for node.js -- test framework agnostic
MIT License
2.75k stars 194 forks source link

rewrite function's method valueOf,test with should.be.a('function') failed #104

Closed reutopiaer closed 11 years ago

reutopiaer commented 11 years ago

//code like this:

require('should'); var I=function I(){}; I.valueOf=function(){return 'I'}; //whitout this line,test will ok console.log('typeof I is '+typeof I); describe("I",function(){ it("I sould be a function",function(){ I.should.be.a('function'); }); });

//output==>AssertionError: expected 'I' to be a function