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 <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
aduh95 authored and bengl committed Feb 22, 2022
1 parent be5143b commit 520dcbc
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 520dcbc

Please sign in to comment.