Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

psmarshall
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected 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.

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 30, 2017
@vsemozhetbyt vsemozhetbyt added the util Issues and PRs related to the built-in util module. label Jun 30, 2017
Copy link
Contributor

@cjihrig cjihrig left a 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.

@@ -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;
Copy link
Member

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.

@jasnell
Copy link
Member

jasnell commented Jul 10, 2017

Copy link
Contributor

@refack refack left a 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.

@psmarshall
Copy link
Contributor Author

Sorry for the slow turnaround, I've moved the import to the top.

@refack
Copy link
Contributor

refack commented Jul 24, 2017

refack pushed a commit that referenced this pull request Jul 24, 2017
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>
@refack
Copy link
Contributor

refack commented Jul 24, 2017

Landed in fe14f9b

@psmarshall congratulations on GitHub promoting you from:
image
to:
image

@refack refack closed this Jul 24, 2017
addaleax pushed a commit that referenced this pull request Jul 24, 2017
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>
@addaleax addaleax mentioned this pull request Jul 24, 2017
@addaleax addaleax mentioned this pull request Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants