Strict mode Failing
Expected no error, got SyntaxError: warning: the variable "Intl" was not declared in function "global"
non-Strict mode Failing
Expected no error, got ReferenceError: Property 'Intl' doesn't exist
Features:
- ∅
Expected no error, got SyntaxError: warning: the variable "Intl" was not declared in function "global"
Expected no error, got ReferenceError: Property 'Intl' doesn't exist
// Copyright 2020 Google Inc, Igalia S.L. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-initializenumberformat description: > Tests that the options numberingSystem are mapped to lower case. author: Caio Lima features: [Array.prototype.includes] ---*/ let defaultLocale = new Intl.NumberFormat().resolvedOptions().locale; let supportedNumberingSystems = ["latn", "arab"].filter(nu => new Intl.NumberFormat(defaultLocale + "-u-nu-" + nu) .resolvedOptions().numberingSystem === nu ); if (supportedNumberingSystems.includes("latn")) { let numberFormat = new Intl.NumberFormat(defaultLocale + "-u-nu-lATn"); assert.sameValue(numberFormat.resolvedOptions().numberingSystem, "latn", "Numbering system option should be in lower case"); } if (supportedNumberingSystems.includes("arab")) { let numberFormat = new Intl.NumberFormat(defaultLocale + "-u-nu-Arab"); assert.sameValue(numberFormat.resolvedOptions().numberingSystem, "arab", "Numbering system option should be in lower case"); }