Skip to content

Commit

Permalink
Merge pull request #388 from chaijs/release-2.1.1
Browse files Browse the repository at this point in the history
Release v2.1.1
  • Loading branch information
keithamus committed Mar 4, 2015
2 parents dbeb2a8 + afd689a commit d7cafca
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 12 deletions.
15 changes: 15 additions & 0 deletions History.md
@@ -1,3 +1,18 @@
2.1.1 / 2015-03-04
==================

* Merge pull request #385 from eldritch-fossicker/master
* updates to reflect code style preference from @keithamus
* fix indexing into array with deep propery
* Merge pull request #382 from astorije/patch-2
* Merge pull request #383 from gurdiga/config-doc-wording-improvement
* config.truncateThreshold docs: simpler wording
* Add missing docstring for showDiff argument of assert
* Merge pull request #381 from astorije/patch-1
* Add a minor precision that empty asserts on strings too.
* Merge pull request #379 from dcneiner/should-primitive-fix
* Primitives now use valueOf in shouldGetter

2.1.0 / 2015-02-23
==================

Expand Down
24 changes: 24 additions & 0 deletions ReleaseNotes.md
@@ -1,5 +1,29 @@
# Release Notes

## 2.1.1 / 2015-03-04

Two minor bugfixes. No new features.

### Community Contributions

#### Code Features & Fixes

* [#385](https://github.com/chaijs/chai/pull/385) Fix a bug (also described in
[#387](https://github.com/chaijs/chai/pull/385)) where `deep.property` would not work with single
key names. By [@eldritch-fossicker](https://github.com/eldritch-fossicker)
* [#379](https://github.com/chaijs/chai/pull/379) Fix bug where tools which overwrite
primitive prototypes, such as Babel or core-js would fail.
By [@dcneiner](https://github.com/dcneiner)

#### Documentation fixes

* [#382](https://github.com/chaijs/chai/pull/382) Add doc for showDiff argument in assert.
By [@astorije](https://github.com/astorije)
* [#383](https://github.com/chaijs/chai/pull/383) Improve wording for truncateTreshold docs
By [@gurdiga](https://github.com/gurdiga)
* [#381](https://github.com/chaijs/chai/pull/381) Improve wording for assert.empty docs
By [@astorije](https://github.com/astorije)

## 2.1.0 / 2015-02-23

Small release; fixes an issue where the Chai lib was incorrectly reporting the
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "chai",
"version": "2.1.0",
"version": "2.1.1",
"description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",
"license": "MIT",
"keywords": [
Expand Down
15 changes: 7 additions & 8 deletions chai.js
Expand Up @@ -678,7 +678,7 @@ var used = []
* Chai version
*/

exports.version = '2.1.0';
exports.version = '2.1.1';

/*!
* Assertion Error
Expand Down Expand Up @@ -852,10 +852,11 @@ module.exports = function (_chai, util) {
*
* @name assert
* @param {Philosophical} expression to be tested
* @param {String or Function} message or function that returns message to display if fails
* @param {String or Function} message or function that returns message to display if expression fails
* @param {String or Function} negatedMessage or function that returns negatedMessage to display if negated expression fails
* @param {Mixed} expected value (remember to check for negation)
* @param {Mixed} actual (optional) will default to `this.obj`
* @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails
* @api private
*/

Expand Down Expand Up @@ -1305,7 +1306,7 @@ module.exports = function (chai, _) {
/**
* ### .empty
*
* Asserts that the target's length is `0`. For arrays, it checks
* Asserts that the target's length is `0`. For arrays and strings, it checks
* the `length` property. For objects, it gets the count of
* enumerable keys.
*
Expand Down Expand Up @@ -3783,10 +3784,8 @@ module.exports = function (chai, util) {
function loadShould () {
// explicitly define this method as function as to have it's name to include as `ssfi`
function shouldGetter() {
if (this instanceof String || this instanceof Number) {
return new Assertion(this.constructor(this), null, shouldGetter);
} else if (this instanceof Boolean) {
return new Assertion(this == true, null, shouldGetter);
if (this instanceof String || this instanceof Number || this instanceof Boolean ) {
return new Assertion(this.valueOf(), null, shouldGetter);
}
return new Assertion(this, null, shouldGetter);
}
Expand Down Expand Up @@ -4326,7 +4325,7 @@ module.exports = function getPathInfo(path, obj) {
last = parsed[parsed.length - 1];

var info = {
parent: _getPathValue(parsed, obj, parsed.length - 1),
parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,
name: last.p || last.i,
value: _getPathValue(parsed, obj),
};
Expand Down
2 changes: 1 addition & 1 deletion component.json
@@ -1,7 +1,7 @@
{
"name": "chai"
, "repo": "chaijs/chai"
, "version": "2.1.0"
, "version": "2.1.1"
, "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic."
, "license": "MIT"
, "keywords": [
Expand Down
2 changes: 1 addition & 1 deletion lib/chai.js
Expand Up @@ -11,7 +11,7 @@ var used = []
* Chai version
*/

exports.version = '2.1.0';
exports.version = '2.1.1';

/*!
* Assertion Error
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -17,7 +17,7 @@
"Veselin Todorov <hi@vesln.com>",
"John Firebaugh <john.firebaugh@gmail.com>"
],
"version": "2.1.0",
"version": "2.1.1",
"repository": {
"type": "git",
"url": "https://github.com/chaijs/chai"
Expand Down

0 comments on commit d7cafca

Please sign in to comment.