aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/intl/list-format/constructor.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/intl/list-format/constructor.js')
-rw-r--r--deps/v8/test/intl/list-format/constructor.js32
1 files changed, 7 insertions, 25 deletions
diff --git a/deps/v8/test/intl/list-format/constructor.js b/deps/v8/test/intl/list-format/constructor.js
index 33a85fd79f..d730516c9c 100644
--- a/deps/v8/test/intl/list-format/constructor.js
+++ b/deps/v8/test/intl/list-format/constructor.js
@@ -54,8 +54,7 @@ assertDoesNotThrow(
assertDoesNotThrow(
() => new Intl.ListFormat(['sr'], {style: 'short'}));
-assertDoesNotThrow(
- () => new Intl.ListFormat(['sr'], {style: 'narrow'}));
+assertThrows(() => new Intl.ListFormat(['sr'], {style: 'narrow'}), RangeError);
assertThrows(
() => new Intl.ListFormat(['sr'], {style: 'giant'}),
@@ -67,8 +66,9 @@ assertDoesNotThrow(
assertDoesNotThrow(
() => new Intl.ListFormat(['sr'], {type: 'conjunction', style: 'short'}));
-assertDoesNotThrow(
- () => new Intl.ListFormat(['sr'], {type: 'conjunction', style: 'narrow'}));
+assertThrows(
+ () => new Intl.ListFormat(['sr'], {type: 'conjunction', style: 'narrow'}),
+ RangeError);
assertDoesNotThrow(
() => new Intl.ListFormat(['sr'], {type: 'disjunction', style: 'long'}));
@@ -76,8 +76,9 @@ assertDoesNotThrow(
assertDoesNotThrow(
() => new Intl.ListFormat(['sr'], {type: 'disjunction', style: 'short'}));
-assertDoesNotThrow(
- () => new Intl.ListFormat(['sr'], {type: 'disjunction', style: 'narrow'}));
+assertThrows(
+ () => new Intl.ListFormat(['sr'], {type: 'disjunction', style: 'narrow'}),
+ RangeError);
assertDoesNotThrow(
() => new Intl.ListFormat(['sr'], {type: 'unit', style: 'long'}));
@@ -87,22 +88,3 @@ assertDoesNotThrow(
assertDoesNotThrow(
() => new Intl.ListFormat(['sr'], {type: 'unit', style: 'narrow'}));
-
-// Throws only once during construction.
-// Check for all getters to prevent regression.
-// Preserve the order of getter initialization.
-let getCount = 0;
-let style = -1;
-let type = -1;
-
-new Intl.ListFormat(['en-US'], {
- get style() {
- style = ++getCount;
- },
- get type() {
- type = ++getCount;
- }
-});
-
-assertEquals(1, type);
-assertEquals(2, style);