diff options
author | Brian White <mscdex@mscdex.net> | 2020-03-14 07:55:44 -0400 |
---|---|---|
committer | Brian White <mscdex@mscdex.net> | 2020-05-30 17:24:43 -0400 |
commit | c24b74a7abec0848484671771d250cfd961f128e (patch) | |
tree | 1e4fec15ee4de3ab4bc483f759322389d71932ec /test/sequential/test-util-debug.js | |
parent | 3f32126fd554be32cb53a2458849697146145fda (diff) | |
download | node-new-c24b74a7abec0848484671771d250cfd961f128e.tar.gz |
lib: improve debuglog() performance
PR-URL: https://github.com/nodejs/node/pull/32260
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/sequential/test-util-debug.js')
-rw-r--r-- | test/sequential/test-util-debug.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sequential/test-util-debug.js b/test/sequential/test-util-debug.js index 6cad46f101..8bf5ae5e5a 100644 --- a/test/sequential/test-util-debug.js +++ b/test/sequential/test-util-debug.js @@ -118,7 +118,9 @@ function child(section) { value: tty.WriteStream.prototype.hasColors }); // eslint-disable-next-line no-restricted-syntax - const debug = util.debuglog(section); + const debug = util.debuglog(section, common.mustCall((cb) => { + assert.strictEqual(typeof cb, 'function'); + })); debug('this', { is: 'a' }, /debugging/); debug('num=%d str=%s obj=%j', 1, 'a', { foo: 'bar' }); console.log('ok'); |