Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9487028

Browse filesBrowse files
aduh95danielleadams
authored andcommitted
test: fix intl tests on small-icu builds
PR-URL: #41939 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 773f587 commit 9487028
Copy full SHA for 9487028

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-intl.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-intl.js
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ if (!common.hasIntl) {
104104
const numberFormat = new Intl.NumberFormat(['en']).format(12345.67890);
105105
assert.strictEqual(numberFormat, '12,345.679');
106106
}
107+
// If list is specified and doesn't contain 'en-US' then return.
108+
if (process.config.variables.icu_locales && !haveLocale('en-US')) {
109+
common.printSkipMessage('detailed Intl tests because American English is ' +
110+
'not listed as supported.');
111+
return;
112+
}
107113
// Number format resolved options
108114
{
109115
const numberFormat = new Intl.NumberFormat('en-US', { style: 'percent' });

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.