Skip to content

Commit 31def41

Browse files
aduh95danielleadams
authored andcommitted
test: fix intl tests on small-icu builds
PR-URL: #41939 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 571eb6d commit 31def41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/parallel/test-intl.js

+6
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)