mirror of
https://github.com/tc39/test262.git
synced 2025-05-06 07:50:28 +02:00
In each case, it's the scalar value associated with the "description" key. Normally in test262, this is written in either: - block notation (indicated by '>' or '|'), or - flow notation, single-line, on the same line as the key. In the cases addressed by this PR, the value is instead written in: - (1x) flow notation, *multi*-line, or - (2x) flow notation, single-line, on the line *after* the key. These are valid YAML, but they're styles that test262 doesn't otherwise use, so could conceivably confuse people or harnesses. This PR changes them to block notation.
29 lines
917 B
JavaScript
29 lines
917 B
JavaScript
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-initializedatetimeformat
|
|
description: >
|
|
Invalid values for the `timeZoneName` option of the DateTimeFormat constructor
|
|
features: [Intl.DateTimeFormat-extend-timezonename]
|
|
---*/
|
|
|
|
assert.throws(RangeError, function () {
|
|
new Intl.DateTimeFormat('en', { timeZoneName: '' });
|
|
}, 'empty string');
|
|
|
|
assert.throws(RangeError, function () {
|
|
new Intl.DateTimeFormat('en', { timeZoneName: 'short ' });
|
|
}, '"short "');
|
|
|
|
assert.throws(RangeError, function () {
|
|
new Intl.DateTimeFormat('en', { timeZoneName: ' long' });
|
|
}, '" long"');
|
|
|
|
assert.throws(RangeError, function () {
|
|
new Intl.DateTimeFormat('en', { timeZoneName: 'offset' });
|
|
}, '"offset"');
|
|
|
|
assert.throws(RangeError, function () {
|
|
new Intl.DateTimeFormat('en', { timeZoneName: 'generic' });
|
|
}, '"generic"');
|