-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 common.hasIntl instead of typeof Intl in Intl v8BreakIterator test #17311
Conversation
@@ -3,7 +3,7 @@ const common = require('../common'); | |||
const assert = require('assert'); | |||
const vm = require('vm'); | |||
|
|||
if (typeof Intl === 'undefined') | |||
if (common.hasIntl === 'undefined') |
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.
common.hasIntl returns boolean, it does not match 'undefined'.
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.
Thanks for reviewing, I fixed it to expect boolean.
PR-URL: #17311 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 6a99224. Thank you and congrats on your PR to core! |
PR-URL: #17311 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #17311 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
@bnoordhuis I see you made the change this commit undoes in 668ad44, is there a reason you didn't keep -if (!common.hasIntl || Intl.v8BreakIterator === undefined)
+if (typeof Intl === 'undefined') Just checking there isn't a problem with it here. (This commit depends on #15238, so shouldn't be backported anyway) |
I changed it because the test tests properties from the Intl object and |
This is a part of Nodefest's Code and Learn nodejs/code-and-learn#72
I replace
typeof Intl
tocommon.hasIntl
intest/parallel/test-intl-v8BreakIterator.js.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)