|
4 | 4 |
|
5 | 5 | let descriptor;
|
6 | 6 |
|
7 |
| -descriptor = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, |
8 |
| - Symbol.toStringTag); |
9 |
| - |
10 |
| -assertEquals("Intl.DateTimeFormat", descriptor.value); |
11 |
| -assertFalse(descriptor.writable); |
12 |
| -assertFalse(descriptor.enumerable); |
13 |
| -assertTrue(descriptor.configurable); |
14 |
| - |
15 |
| -descriptor = Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, |
16 |
| - Symbol.toStringTag); |
17 |
| - |
18 |
| -assertEquals("Intl.NumberFormat", descriptor.value); |
19 |
| -assertFalse(descriptor.writable); |
20 |
| -assertFalse(descriptor.enumerable); |
21 |
| -assertTrue(descriptor.configurable); |
22 |
| - |
23 |
| -descriptor = Object.getOwnPropertyDescriptor(Intl.Collator.prototype, |
24 |
| - Symbol.toStringTag); |
25 |
| - |
26 |
| -assertEquals("Intl.Collator", descriptor.value); |
27 |
| -assertFalse(descriptor.writable); |
28 |
| -assertFalse(descriptor.enumerable); |
29 |
| -assertTrue(descriptor.configurable); |
| 7 | +for (const [obj, tag] of |
| 8 | + [[Intl, "Intl"], |
| 9 | + [Intl.Collator.prototype, "Intl.Collator"], |
| 10 | + [Intl.DateTimeFormat.prototype, "Intl.DateTimeFormat"], |
| 11 | + [Intl.DisplayNames.prototype, "Intl.DisplayNames"], |
| 12 | + [Intl.Locale.prototype, "Intl.Locale"], |
| 13 | + [Intl.ListFormat.prototype, "Intl.ListFormat"], |
| 14 | + [Intl.NumberFormat.prototype, "Intl.NumberFormat"], |
| 15 | + [Intl.RelativeTimeFormat.prototype, "Intl.RelativeTimeFormat"], |
| 16 | + [Intl.PluralRules.prototype, "Intl.PluralRules"], |
| 17 | + ]) { |
| 18 | + descriptor = Object.getOwnPropertyDescriptor(obj, |
| 19 | + Symbol.toStringTag); |
| 20 | + assertEquals(tag, descriptor.value); |
| 21 | + assertFalse(descriptor.writable); |
| 22 | + assertFalse(descriptor.enumerable); |
| 23 | + assertTrue(descriptor.configurable); |
| 24 | +} |
0 commit comments