Release 1.6.0

This commit is contained in:
Jake Luer 2013-04-29 20:15:39 -04:00
parent 18e15b7dfc
commit e18c48329b
7 changed files with 137 additions and 26 deletions

View file

@ -1,4 +1,27 @@
1.6.0 / 2013-04-29
==================
* build: browser
* assert: [(not)include] throw on incompatible haystack. Closes #142
* assert: [notInclude] add assert.notInclude. Closes #158
* browser build
* makefile: force browser build on browser-test
* makefile: use component for browser build
* core: [assertions] remove extraneous comments
* Merge branch 'master' of github.com:chaijs/chai
* test: [assert] deep equal ordering
* Merge pull request #153 from NickHeiner/array-assertions
* giving members a no-flag assertion
* Code review comments - changing syntax
* Code review comments
* Adding members and memberEquals assertions for checking for subsets and set equality. Implements chaijs/chai#148.
* Merge pull request #140 from RubenVerborgh/function-prototype
* Restore the `call` and `apply` methods of Function when adding a chainable method.
* readme: 2013
* notes: migration notes for deep equal changes
* test: for ever err() there must be a passing version
1.5.0 / 2013-02-03
==================

View file

@ -9,37 +9,37 @@ For more information or to download plugins, view the [documentation](http://cha
### Contributors
project : chai
repo age : 1 year, 2 months
active : 117 days
commits : 616
files : 56
authors :
459 Jake Luer 74.5%
66 Veselin Todorov 10.7%
42 Domenic Denicola 6.8%
5 Jo Liss 0.8%
5 Ruben Verborgh 0.8%
5 Scott Nonnenberg 0.8%
repo age : 1 year, 5 months
active : 123 days
commits : 638
files : 55
authors :
476 Jake Luer 74.6%
66 Veselin Todorov 10.3%
42 Domenic Denicola 6.6%
6 Ruben Verborgh 0.9%
5 Juliusz Gonera 0.8%
5 Scott Nonnenberg 0.8%
5 Jo Liss 0.8%
4 josher19 0.6%
4 John Firebaugh 0.6%
4 Nick Heiner 0.6%
3 Jeff Barczewski 0.5%
2 Edwin Shao 0.3%
2 Jakub Nešetřil 0.3%
2 Teddy Cross 0.3%
2 Jakub Nešetřil 0.3%
1 Anand Patil 0.2%
1 Kilian Ciuffolo 0.2%
1 Niklas Närhinen 0.2%
1 Paul Miller 0.2%
1 Chun-Yi 0.2%
1 Jeff Welch 0.2%
1 Sasha Koss 0.2%
1 Chris Connelly 0.2%
1 Jeff Welch 0.2%
1 Benjamin Horsleben 0.2%
1 Victor Costan 0.2%
1 Chun-Yi 0.2%
1 Vinay Pulim 0.2%
1 DD 0.2%
1 Kilian Ciuffolo 0.2%
## License

View file

@ -1,5 +1,63 @@
# Release Notes
## 1.6.0 / 2013-04-29
The following changes are required if you are upgrading from the previous version:
- **Users:**
- No changes required.
- **Plugin Developers:**
- No changes required.
- **Core Contributors:**
- Refresh `node_modules` folder for updated developement dependencies.
### New Assertions
#### Array Members Inclusion
Asserts that the target is a superset of `set`, or that the target and `set` have the same members.
Order is not taken into account. Thanks to [#NickHeiner](https://github.com/NickHeiner) for the contribution.
```js
// (expect/should) full set
expect([4, 2]).to.have.members([2, 4]);
expect([5, 2]).to.not.have.members([5, 2, 1]);
// (expect/should) inclusion
expect([1, 2, 3]).to.include.members([3, 2]);
expect([1, 2, 3]).to.not.include.members([3, 2, 8]);
// (assert) full set
assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');
// (assert) inclusion
assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members');
```
#### Non-inclusion for Assert Interface
Most `assert` functions have a negative version, like `instanceOf()` has a corresponding `notInstaceOf()`.
However `include()` did not have a corresponding `notInclude()`. This has been added.
```js
assert.notInclude([ 1, 2, 3 ], 8);
assert.notInclude('foobar', 'baz');
```
### Community Contributions
- [#140](https://github.com/chaijs/chai/pull/140) Restore `call`/`apply` methods for plugin interface. [@RubenVerborgh](https://github.com/RubenVerborgh)
- [#148](https://github.com/chaijs/chai/issues/148)/[#153](https://github.com/chaijs/chai/pull/153) Add `members` and `include.members` assertions. [#NickHeiner](https://github.com/NickHeiner)
Thank you to all who took time to contribute!
### Other Bug Fixes
- [#142](https://github.com/chaijs/chai/issues/142) `assert#include` will no longer silently pass on wrong-type haystack.
- [#158](https://github.com/chaijs/chai/issues/158) `assert#notInclude` has been added.
- Travis-CI now tests Node.js `v0.10.x`. Support for `v0.6.x` has been removed. `v0.8.x` is still tested as before.
## 1.5.0 / 2013-02-03
### Migration Requirements

43
chai.js
View file

@ -218,7 +218,7 @@ var used = []
* Chai version
*/
exports.version = '1.5.0';
exports.version = '1.6.0';
/*!
* Primary `Assertion` prototype
@ -517,6 +517,7 @@ module.exports = function (chai, _) {
* - with
* - at
* - of
* - same
*
* @name language chains
* @api public
@ -1719,8 +1720,8 @@ module.exports = function (chai, _) {
* expect([1, 2, 3]).to.include.members([3, 2]);
* expect([1, 2, 3]).to.not.include.members([3, 2, 8]);
*
* expect([4, 2]).to.have.same.members([2, 4]);
* expect([5, 2]).to.not.have.same.members([5, 2, 1]);
* expect([4, 2]).to.have.members([2, 4]);
* expect([5, 2]).to.not.have.members([5, 2, 1]);
*
* @name members
* @param {Array} set
@ -2760,14 +2761,44 @@ module.exports = function (chai, util) {
new Assertion(act, msg).to.be.closeTo(exp, delta);
};
assert.includeMembers = function (superset, subset, msg) {
new Assertion(superset, msg).to.include.members(subset);
}
/**
* ### .sameMembers(set1, set2, [message])
*
* Asserts that `set1` and `set2` have the same members.
* Order is not taken into account.
*
* assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');
*
* @name sameMembers
* @param {Array} superset
* @param {Array} subset
* @param {String} message
* @api public
*/
assert.sameMembers = function (set1, set2, msg) {
new Assertion(set1, msg).to.have.same.members(set2);
}
/**
* ### .includeMembers(superset, subset, [message])
*
* Asserts that `subset` is included in `superset`.
* Order is not taken into account.
*
* assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members');
*
* @name includeMembers
* @param {Array} superset
* @param {Array} subset
* @param {String} message
* @api public
*/
assert.includeMembers = function (superset, subset, msg) {
new Assertion(superset, msg).to.include.members(subset);
}
/*!
* Undocumented / untested
*/

View file

@ -1,7 +1,7 @@
{
"name": "chai"
, "repo": "chaijs/chai"
, "version": "1.5.0"
, "version": "1.6.0"
, "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic."
, "license": "MIT"
, "keywords": [

View file

@ -11,7 +11,7 @@ var used = []
* Chai version
*/
exports.version = '1.5.0';
exports.version = '1.6.0';
/*!
* Primary `Assertion` prototype

View file

@ -11,7 +11,7 @@
"Veselin Todorov <hi@vesln.com>",
"John Firebaugh <john.firebaugh@gmail.com>"
],
"version": "1.5.0",
"version": "1.6.0",
"repository": {
"type": "git",
"url": "https://github.com/chaijs/chai"
@ -29,7 +29,6 @@
"dependencies": {},
"devDependencies": {
"component": "*"
, "folio": "0.3.x"
, "mocha": "*"
, "mocha-cloud": "*"
, "mocha-phantomjs": "*"