initial commit

This commit is contained in:
tmshv committed 2014-02-12 12:36:59 +04:00
commit d3fcd7f10c
3159 files changed
+349702

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
/*!
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
module.exports = function(should, Assertion) {
Assertion.add('startWith', function(str, description) {
this.params = { operator: 'to start with ' + should.format(str), message: description };
this.assert(0 === this.obj.indexOf(str));
});
Assertion.add('endWith', function(str, description) {
this.params = { operator: 'to end with ' + should.format(str), message: description };
this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0);
});
};