-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
test: fix intl tests on small-icu builds #41939
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -104,6 +104,12 @@ if (!common.hasIntl) { | |||||||||||||||
| const numberFormat = new Intl.NumberFormat(['en']).format(12345.67890); | ||||||||||||||||
| assert.strictEqual(numberFormat, '12,345.679'); | ||||||||||||||||
| } | ||||||||||||||||
| // If list is specified and doesn't contain 'en-US' then return. | ||||||||||||||||
| if (process.config.variables.icu_locales && !haveLocale('en-US')) { | ||||||||||||||||
| common.printSkipMessage( | ||||||||||||||||
| 'detailed Intl tests because Node.js was built with small ICU.'); | ||||||||||||||||
| return; | ||||||||||||||||
|
||||||||||||||||
| // If list is specified and doesn't contain 'en' then return. | |
| if (process.config.variables.icu_locales && !haveLocale('en')) { | |
| common.printSkipMessage( | |
| 'detailed Intl tests because English is not listed as supported.'); | |
| // Smoke test. Does it format anything, or fail? | |
| console.log(`Date(0) formatted to: ${dtf.format(date0)}`); | |
| return; |
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.
I believe common.skip() is for skipping everything in the file as it exits immediately, but common.printSkipMessage() can be used if you're just skipping a single test case in a file as it only prints a TAP message. But, uh, it's been a while since I've had to actually know how they worked.
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.
It's true, but the return; here effectively ends the test file.
Uh oh!
There was an error while loading. Please reload this page.