2018-03-20 02:25:22 +01:00
|
|
|
'use strict';
|
|
|
|
require('../common');
|
|
|
|
const assert = require('assert').strict;
|
|
|
|
|
|
|
|
try {
|
|
|
|
// Activate colors even if the tty does not support colors.
|
|
|
|
process.env.COLORTERM = '1';
|
2019-02-28 21:29:08 +01:00
|
|
|
// Make sure TERM is not set to e.g., 'dumb' and NODE_DISABLE_COLORS is not
|
|
|
|
// active.
|
|
|
|
process.env.TERM = 'FOOBAR';
|
|
|
|
delete process.env.NODE_DISABLE_COLORS;
|
2019-06-03 16:05:37 +02:00
|
|
|
assert.deepStrictEqual([1, 2, 2, 2, 2], [2, 2, 2, 2, 2]);
|
2018-03-20 02:25:22 +01:00
|
|
|
} catch (err) {
|
2018-09-25 11:17:30 +02:00
|
|
|
const expected = 'Expected values to be strictly deep-equal:\n' +
|
2018-07-03 02:06:57 +02:00
|
|
|
'\u001b[32m+ actual\u001b[39m \u001b[31m- expected\u001b[39m' +
|
2018-04-26 03:24:45 +02:00
|
|
|
' \u001b[34m...\u001b[39m Lines skipped\n\n' +
|
2018-03-20 02:25:22 +01:00
|
|
|
' [\n' +
|
2018-07-03 02:06:57 +02:00
|
|
|
'\u001b[32m+\u001b[39m 1,\n' +
|
|
|
|
'\u001b[31m-\u001b[39m 2,\n' +
|
2018-04-26 03:24:45 +02:00
|
|
|
' 2,\n' +
|
|
|
|
'\u001b[34m...\u001b[39m\n' +
|
2019-06-03 16:05:37 +02:00
|
|
|
' 2,\n' +
|
2018-03-20 02:25:22 +01:00
|
|
|
' 2\n' +
|
|
|
|
' ]';
|
|
|
|
assert.strictEqual(err.message, expected);
|
|
|
|
}
|