-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: use a different external object in test-util-inspect #14003
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if the CI passes.
test/parallel/test-util-inspect.js
Outdated
@@ -82,7 +82,8 @@ assert.strictEqual(util.inspect(Object.assign(new String('hello'), | |||
{ [Symbol('foo')]: 123 }), { showHidden: true }), | |||
'{ [String: \'hello\'] [length]: 5, [Symbol(foo)]: 123 }'); | |||
|
|||
assert.strictEqual(util.inspect(process.stdin._handle._externalStream), | |||
const JSStream = process.binding('js_stream').JSStream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Destructuring can be used here, and generally these imports are positioned at the top of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO even require surrogates should be at the top of the file.
7505605
to
559dce3
Compare
Sorry for the slow turnaround, I've moved the import to the top. |
@psmarshall thank you! |
PR-URL: #14003 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Landed in fe14f9b @psmarshall congratulations on GitHub promoting you from: |
PR-URL: #14003 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test
This test can fail if process.stdin._handle doesn't exist, which can happen in some environments. The test just wants to check that external objects are represented properly, so we can pass in a JSStream external object instead.