From 5aa3a2d172efb5cdca07ba6f0f2b8b054ced97ea Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sat, 9 Dec 2017 19:38:20 -0200 Subject: [PATCH] assert: improve error messages From now on all error messages produced by `assert` in strict mode will produce a error diff. Backport-PR-URL: https://github.com/nodejs/node/pull/19230 PR-URL: https://github.com/nodejs/node/pull/17615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- doc/api/assert.md | 33 ++++++++ lib/assert.js | 16 +++- lib/internal/errors.js | 150 ++++++++++++++++++++++++++++++++++- test/parallel/test-assert.js | 143 ++++++++++++++++++++++++++++++++- 4 files changed, 332 insertions(+), 10 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index d53bccd21a998d..68b01350dfdee6 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -17,6 +17,9 @@ For more information about the used equality comparisons see