mirror of https://github.com/tc39/test262.git
Improve various assertion messages
This commit is contained in:
parent
dcf184a0ee
commit
6058710478
|
@ -9,4 +9,8 @@ features: [Temporal]
|
|||
|
||||
const instance = new Temporal.Duration(1, 0, 0, 1);
|
||||
const relativeTo = "2000-01-01T00:00+05:30[UTC]";
|
||||
assert.throws(RangeError, () => instance.add(new Temporal.Duration(0, 0, 0, 0, -24), { relativeTo }));
|
||||
assert.throws(
|
||||
RangeError,
|
||||
() => instance.add(new Temporal.Duration(0, 0, 0, 0, -24), { relativeTo }),
|
||||
"add should throw RangeError on a string with UTC offset mismatch"
|
||||
);
|
||||
|
|
|
@ -9,4 +9,8 @@ features: [Temporal]
|
|||
|
||||
const instance = new Temporal.Duration(1, 0, 0, 0, 24);
|
||||
const relativeTo = "2000-01-01T00:00+05:30[UTC]";
|
||||
assert.throws(RangeError, () => instance.round({ largestUnit: "years", relativeTo }));
|
||||
assert.throws(
|
||||
RangeError,
|
||||
() => instance.round({ largestUnit: "years", relativeTo }),
|
||||
"round should throw RangeError on a string with UTC offset mismatch"
|
||||
);
|
||||
|
|
|
@ -9,4 +9,8 @@ features: [Temporal]
|
|||
|
||||
const instance = new Temporal.Duration(1, 0, 0, 1);
|
||||
const relativeTo = "2000-01-01T00:00+05:30[UTC]";
|
||||
assert.throws(RangeError, () => instance.subtract(new Temporal.Duration(0, 0, 0, 0, 24), { relativeTo }));
|
||||
assert.throws(
|
||||
RangeError,
|
||||
() => instance.subtract(new Temporal.Duration(0, 0, 0, 0, 24), { relativeTo }),
|
||||
"subtract should throw RangeError on a string with UTC offset mismatch"
|
||||
);
|
||||
|
|
|
@ -9,4 +9,8 @@ features: [Temporal]
|
|||
|
||||
const instance = new Temporal.Duration(1, 0, 0, 0, 24);
|
||||
const relativeTo = "2000-01-01T00:00+05:30[UTC]";
|
||||
assert.throws(RangeError, () => instance.total({ unit: "days", relativeTo }));
|
||||
assert.throws(
|
||||
RangeError,
|
||||
() => instance.total({ unit: "days", relativeTo }),
|
||||
"total should throw RangeError on a string with UTC offset mismatch"
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue