node/test/pseudo-tty/test-assert-no-color.js
Giovanni Bucci 4d6d7d644b
assert: make assertion_error use Myers diff algorithm
Fixes: https://github.com/nodejs/node/issues/51733

Co-Authored-By: Pietro Marchini <pietro.marchini94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54862
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-10-17 16:02:54 +00:00

20 lines
391 B
JavaScript

'use strict';
require('../common');
const assert = require('assert').strict;
process.env.NODE_DISABLE_COLORS = true;
assert.throws(
() => {
assert.deepStrictEqual({}, { foo: 'bar' });
},
{
message: 'Expected values to be strictly deep-equal:\n' +
'+ actual - expected\n' +
'\n' +
'+ {}\n' +
'- {\n' +
'- foo: \'bar\'\n' +
'- }\n',
});