Skip to content
Snippets Groups Projects
Commit a3d91b12 authored by Ms2ger's avatar Ms2ger Committed by Rick Waldron
Browse files

Intl.ListFormat: Add a test for unsupported options combinations.

parent e5ae99c6
No related branches found
No related tags found
No related merge requests found
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-Intl.ListFormat
description: Checks handling of invalid value for the type option to the ListFormat constructor.
info: |
InitializeListFormat (listFormat, locales, options)
7. Let type be GetOption(options, "type", "string", « "conjunction", "disjunction", "unit" », "conjunction").
features: [Intl.ListFormat]
---*/
const invalidTypes = [
"conjunction",
"disjunction",
];
for (const type of invalidTypes) {
assert.throws(RangeError, function() {
new Intl.ListFormat([], { style: "narrow", type });
}, `${type} is an invalid type option value when style is narrow.`);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment