Skip to content
Snippets Groups Projects
Commit 1702336a authored by Daniel Ehrenberg's avatar Daniel Ehrenberg Committed by Leo Balter
Browse files

Test change in PluralRules default options semantics (#1350)

The change is done in the following patch, where default options
have a null prototype. This matches what other Intl objects have.
https://github.com/tc39/proposal-intl-plural-rules/commit/1abe8af440fb47d888ace701e8a46559bdbe7b06
parent fe1b7e2a
No related branches found
No related tags found
No related merge requests found
// 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");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment