test: fix intl tests on small-icu builds
PR-URL: https://github.com/nodejs/node/pull/41939 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
aff8b874e3
commit
f282e4a94d
@ -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' });
|
||||
|
Loading…
x
Reference in New Issue
Block a user