0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/test/pseudo-tty/test-assert-no-color.js
Florin-Daniel BÎLBÎE a2c2c78e09 test: assert diff no color
PR-URL: https://github.com/nodejs/node/pull/24181
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-13 13:32:56 -08:00

20 lines
418 B
JavaScript

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