tj / should.js

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

Mixin own extensions #15

Closed ghost closed 12 years ago

ghost commented 13 years ago

Hi! Is it possible to add extensions? I would like to have something like underscore's mixin function.

should.mixin({ integer: function(val) { return val % 1 == 0 } });
tj commented 13 years ago

there is no built in way to do it, but nothing wrong with just extending the prototype