diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 43bd4c770e9cb8..6444bfba6c3324 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -528,4 +528,9 @@ testBlockTypeError(assert.doesNotThrow, undefined); assert.throws(() => { throw 'error'; }, (err) => err === 'error'); assert.throws(() => { throw new Error(); }, (err) => err instanceof Error); +// Long values should be truncated for display. +assert.throws(() => { + assert.strictEqual('A'.repeat(1000), ''); +}, new RegExp(`'${'A'.repeat(127)} === ''`)); + console.log('All OK');