Skip to content

Commit

Permalink
Release 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed Apr 7, 2014
1 parent 76e7940 commit 14deff5
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 56 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
3.3.0 / 2014-04-07
==================

* Added .enumerable(name, val)

3.2.0 / 2014-03-29
==================

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "should",
"description": "test framework agnostic BDD-style assertions",
"version": "3.2.0",
"version": "3.3.0",
"author": "TJ Holowaychuk <[email protected]>",
"repository": {
"type": "git",
Expand Down
14 changes: 14 additions & 0 deletions should.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,19 @@ var aSlice = Array.prototype.slice;
module.exports = function(should, Assertion) {
var i = should.format;

Assertion.add('enumerable', function(name, val) {
this.params = {
operator:"to have enumerable property '"+name+"'"
};

this.assert(this.obj.propertyIsEnumerable(name));

if(arguments.length > 1){
this.params.operator += " equal to '"+val+"'";
this.assert(eql(val, this.obj[name]));
}
});

Assertion.add('property', function(name, val) {
if(arguments.length > 1) {
var p = {};
Expand Down Expand Up @@ -953,6 +966,7 @@ module.exports = function(should, Assertion) {
});

};

},{"../eql":2,"../util":16}],13:[function(require,module,exports){
/*!
* Should
Expand Down
Loading

0 comments on commit 14deff5

Please sign in to comment.