Skip to content

Commit

Permalink
test: fix intl tests on small-icu builds
Browse files Browse the repository at this point in the history
PR-URL: #41939
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
aduh95 authored and bengl committed Feb 21, 2022
1 parent 5fa4455 commit 8cf9181
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/parallel/test-intl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 American English is ' +
'not listed as supported.');
return;
}
// Number format resolved options
{
const numberFormat = new Intl.NumberFormat('en-US', { style: 'percent' });
Expand Down

0 comments on commit 8cf9181

Please sign in to comment.