Socket
Socket
Sign inDemoInstall

chai

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

bower.json
{
"name": "chai",
"version": "2.1.0",
"version": "2.1.1",
"description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -0,1 +1,16 @@

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

@@ -2,0 +17,0 @@ ==================

@@ -14,3 +14,3 @@ /*!

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

@@ -17,0 +17,0 @@ /*!

@@ -91,6 +91,7 @@ /*!

* @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

@@ -97,0 +98,0 @@ */

@@ -37,7 +37,12 @@ module.exports = {

* User configurable property, sets length threshold for actual and
* expected values in assertion errors. If this threshold is exceeded,
* the value is truncated.
* expected values in assertion errors. If this threshold is exceeded, for
* example for large data structures, the value is replaced with something
* like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.
*
* Set it to zero if you want to disable truncating altogether.
*
* This is especially userful when doing assertions on arrays: having this
* set to a reasonable large value makes the failure messages readily
* inspectable.
*
* chai.config.truncateThreshold = 0; // disable truncating

@@ -44,0 +49,0 @@ *

@@ -351,3 +351,3 @@ /*!

*
* 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

@@ -354,0 +354,0 @@ * enumerable keys.

@@ -13,6 +13,4 @@ /*!

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);
}

@@ -19,0 +17,0 @@ return new Assertion(this, null, shouldGetter);

@@ -35,3 +35,3 @@ /*!

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,

@@ -38,0 +38,0 @@ value: _getPathValue(parsed, obj),

@@ -20,3 +20,3 @@ {

],
"version": "2.1.0",
"version": "2.1.1",
"repository": {

@@ -23,0 +23,0 @@ "type": "git",

# 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

@@ -4,0 +28,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc