Skip to content

Commit

Permalink
Merge pull request #383 from gurdiga/config-doc-wording-improvement
Browse files Browse the repository at this point in the history
config.truncateThreshold docs: simpler wording
  • Loading branch information
keithamus committed Mar 1, 2015
2 parents a97680f + be8d7a6 commit 1ce171f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions chai.js
Expand Up @@ -932,11 +932,16 @@ module.exports = {
* ### config.truncateThreshold
*
* 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
*
* @param {Number}
Expand Down
9 changes: 7 additions & 2 deletions lib/chai/config.js
Expand Up @@ -34,11 +34,16 @@ module.exports = {
* ### config.truncateThreshold
*
* 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
*
* @param {Number}
Expand Down

0 comments on commit 1ce171f

Please sign in to comment.