chaijs/chai — pull request #214 by romario333 (2013-11-25 08:18:36+00:00)
Title: Fix issue #166 - configurable threshold in objDisplay.

40-char limit after which expected and actual values are truncated is sometimes limiting. For example today I get this message:

AssertionError: expected { Object (id, title) } to deeply equal { id: 1, title: 'pull-request 1' }

But here I would much rather get this message:

AssertionError: expected { id: 1,
title: 'pull-request 1',
'$get': [Function],
'$save': [Function],
'$query': [Function],
'$remove': [Function],
'$delete': [Function] } to deeply equal { id: 1, title: 'pull-request 1' }

To solve this I have added `chai.Assertion.truncateThreshold` configuration property. It allows you to set threshold after which values should be truncated, or disable truncation altogether (if set to 0).