diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2022-02-14 18:28:34 +0100 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2022-11-01 00:37:17 -0400 |
commit | 94870280438a10f0780504f6b341fc85715c6b11 (patch) | |
tree | 345def1bff5701f60cb5337cf6735141a512e989 | |
parent | 773f587912ae1297bdc5c6f4b9ab9391c38eb76a (diff) | |
download | node-new-94870280438a10f0780504f6b341fc85715c6b11.tar.gz |
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>
-rw-r--r-- | test/parallel/test-intl.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js index 956383c528..7d1742f2c7 100644 --- a/test/parallel/test-intl.js +++ b/test/parallel/test-intl.js @@ -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' }); |