Skip to content

Commit c823808

Browse files
committed
chore: improve text representation of types during sdam logging
Using `util.inspect` for visualizing monitoring events provides more detailed information on field changes when using sdamviz
1 parent 306b5b3 commit c823808

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/tools/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const deprecateOptions = require('../../lib/utils').deprecateOptions;
55
const arrayStrictEqual = require('../../lib/core/utils').arrayStrictEqual;
66
const errorStrictEqual = require('../../lib/core/utils').errorStrictEqual;
77
const chalk = require('chalk');
8+
const util = require('util');
89
const chai = require('chai');
910
const expect = chai.expect;
1011
const sinonChai = require('sinon-chai');
@@ -66,7 +67,9 @@ function diff(lhs, rhs, fields, comparator) {
6667

6768
if (!comparator(lhs[field], rhs[field])) {
6869
diff.push(
69-
` ${field}: ${chalk.green(`[${lhs[field]}]`)} => ${chalk.green(`[${rhs[field]}]`)}`
70+
` ${field}: ${chalk.green(`${util.inspect(lhs[field])}`)} => ${chalk.green(
71+
`${util.inspect(rhs[field])}`
72+
)}`
7073
);
7174
}
7275

0 commit comments

Comments
 (0)