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 (C) 2017 Igalia, S. L. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-initializepluralrules description: > Monkey-patching Object.prototype does not change the default options for PluralRules as a null prototype is used. info: | InitializePluralRules ( collator, locales, options ) 1. If _options_ is *undefined*, then 1. Let _options_ be ObjectCreate(*null*). ---*/ Object.prototype.type = "ordinal"; let pluralRules = new Intl.PluralRules("en"); assert.sameValue(pluralRules.resolvedOptions().type, "cardinal");