diff --git a/test/ecmascript.mjs b/test/ecmascript.mjs index f2f78636..a3ac7adc 100644 --- a/test/ecmascript.mjs +++ b/test/ecmascript.mjs @@ -470,7 +470,9 @@ describe('ECMAScript', () => { const missingFromCLDR = ['CET', 'EET', 'MET', 'WET']; // All IDs that we know about - const ids = [...new Set([...missingFromCLDR, ...cldrIdentifiers, ...Intl.supportedValuesOf('timeZone')])]; + // Intl.supportedValuesOf is not available in older runtimes (Node 14) + const IntlNativeIdentifiers = Intl.supportedValuesOf ? Intl.supportedValuesOf('timeZone') : []; + const ids = [...new Set([...missingFromCLDR, ...cldrIdentifiers, ...IntlNativeIdentifiers])]; for (const id of ids) { const lower = id.toLowerCase(); @@ -481,6 +483,9 @@ describe('ECMAScript', () => { } }); it('Returns canonical IDs', () => { + if (!Intl.supportedValuesOf) { + return; // Some environments don't support Intl.supportedValuesOf. + } const ids = Intl.supportedValuesOf('timeZone'); for (const id of ids) { equal(ES.GetAvailableNamedTimeZoneIdentifier(id).primaryIdentifier, id); diff --git a/test/expected-failures.txt b/test/expected-failures.txt index 28fdab2c..1e8e1383 100644 --- a/test/expected-failures.txt +++ b/test/expected-failures.txt @@ -2,3 +2,6 @@ # expected test failures for the transpiled or optimized builds of the polyfill, # see expected-failures-es5.txt and expected-failures-opt.txt respectively. +# Upstream commit 076f2871 introduces a second ToString call on a calendar when +# canonicalizing the timezone name. +staging/Intl402/Temporal/old/date-time-format.js