config.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. module.exports = {
  2. /**
  3. * ### config.includeStack
  4. *
  5. * User configurable property, influences whether stack trace
  6. * is included in Assertion error message. Default of false
  7. * suppresses stack trace in the error message.
  8. *
  9. * chai.config.includeStack = true; // enable stack on error
  10. *
  11. * @param {Boolean}
  12. * @api public
  13. */
  14. includeStack: false,
  15. /**
  16. * ### config.showDiff
  17. *
  18. * User configurable property, influences whether or not
  19. * the `showDiff` flag should be included in the thrown
  20. * AssertionErrors. `false` will always be `false`; `true`
  21. * will be true when the assertion has requested a diff
  22. * be shown.
  23. *
  24. * @param {Boolean}
  25. * @api public
  26. */
  27. showDiff: true,
  28. /**
  29. * ### config.truncateThreshold
  30. *
  31. * User configurable property, sets length threshold for actual and
  32. * expected values in assertion errors. If this threshold is exceeded, for
  33. * example for large data structures, the value is replaced with something
  34. * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.
  35. *
  36. * Set it to zero if you want to disable truncating altogether.
  37. *
  38. * This is especially userful when doing assertions on arrays: having this
  39. * set to a reasonable large value makes the failure messages readily
  40. * inspectable.
  41. *
  42. * chai.config.truncateThreshold = 0; // disable truncating
  43. *
  44. * @param {Number}
  45. * @api public
  46. */
  47. truncateThreshold: 40
  48. };