Skip to content

Commit

Permalink
Release 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed Mar 29, 2014
1 parent d4432a6 commit 48a96f0
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 60 deletions.
7 changes: 7 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
3.2.0 / 2014-03-29
==================

* Added first version of .any modifier that affect assertions with multiple parameters
* .header now have more nice message
* assertion can now override how to show object

3.1.4 / 2014-03-18
==================

Expand Down
4 changes: 4 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ assert.ifError(value) // should(value).Error (to check if it is error) or should
`.not` negate current assertion.
## .any
`.any` allow for assertions with multiple parameters to assert on any of parameters (not all)
# Assertions
## chaining assertions
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-beta1",
"version": "3.2.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions should.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ module.exports = function(should) {

module.exports = function(should, Assertion) {
Assertion.add('true', function() {
this.is.exactly(true)
this.is.exactly(true);
}, true);

Assertion.add('false', function() {
this.is.exactly(false)
this.is.exactly(false);
}, true);

Assertion.add('ok', function() {
Expand Down Expand Up @@ -453,7 +453,7 @@ module.exports = function(should, Assertion) {
});
}

['an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which'].forEach(addLink);
['an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which', 'the'].forEach(addLink);
};
},{}],7:[function(require,module,exports){
/*!
Expand Down Expand Up @@ -1197,7 +1197,7 @@ Assertion.prototype = {
},

getMessage: function() {
return 'expected ' + i(this.obj) + (this.negate ? ' not ': ' ') +
return 'expected ' + ('obj' in this.params ? this.params.obj: i(this.obj)) + (this.negate ? ' not ': ' ') +
this.params.operator + ('expected' in this.params ? ' ' + i(this.params.expected) : '');
},

Expand Down
Loading

0 comments on commit 48a96f0

Please sign in to comment.