Closed weepy closed 11 years ago
@weepy, the exported object from should is not the same as you get when accessing the property with the same name on any object. Only the exist
property and some modifiers are available on it. See the section titled "exist (static)" in the README. That said, it seems that should doesn't work well in REPL.
Try running the following code with node and it may clarify it more:
var should = require("should");
console.log("should.eql", typeof should.eql);
console.log("should.exist", typeof should.exist);
console.log("'foo'.should.eql", typeof "foo".should.eql);
It will print the following:
should.eql undefined
should.exist function
'foo'.should.eql function
fresh install
npm install should
node
what is happening ?