mirror of https://github.com/tc39/test262.git
Fix not-callable getOffsetNansecondsFor tests
Unfortunately, in #3304 I made a last-minute mistake when I added the uncallable value to the assertion message, and neglected to test it; Symbols can't be converted to strings like that, so these tests would fail. This fixes the assertion messages.
This commit is contained in:
parent
fc6a9169a4
commit
1d09acaac1
|
@ -16,6 +16,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.dateAdd(datetime, duration),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -17,11 +17,11 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.dateUntil(datetime, date),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.dateUntil(date, datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.day(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.dayOfWeek(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.dayOfYear(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.daysInMonth(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.daysInWeek(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.daysInYear(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.inLeapYear(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.month(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.monthCode(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.monthsInYear(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.weekOfYear(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => calendar.year(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.Duration.compare(duration1, duration2, { relativeTo: { year: 2000, month: 5, day: 2, hour: 12, timeZone } }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.Duration.compare(duration1, duration2, { relativeTo }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.add(other, { relativeTo: { year: 2000, month: 5, day: 2, hour: 12, timeZone } }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -16,6 +16,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.add(other, { relativeTo }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.round({ smallestUnit: "seconds", relativeTo: { year: 2000, month: 5, day: 2, hour: 12, timeZone } }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.round({ smallestUnit: "seconds", relativeTo: datetime }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.subtract(other, { relativeTo: { year: 2000, month: 5, day: 2, hour: 12, timeZone } }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -16,6 +16,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.subtract(other, { relativeTo }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.total({ unit: "seconds", relativeTo: { year: 2000, month: 5, day: 2, hour: 12, timeZone } }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => duration.total({ unit: "seconds", relativeTo: datetime }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ const instance = new Temporal.Instant(1_000_000_000_987_654_321n);
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => instance.toJSON(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => instant.toString({ timeZone }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.Now.plainDate('iso8601', timeZone),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.Now.plainDateISO(timeZone),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.Now.plainDateTime('iso8601', timeZone),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.Now.plainDateTimeISO(timeZone),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.Now.plainTimeISO(timeZone),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,11 +15,11 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainDate.compare(datetime, date),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainDate.compare(date, datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainDate.from(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => date.equals(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => date.since(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => date.toPlainDateTime(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => date.toZonedDateTime({ plainTime: datetime, timeZone: "UTC" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -18,6 +18,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => date.toZonedDateTime({ plainTime, timeZone }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => date.until(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,11 +15,11 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainDateTime.compare(datetime, plain),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainDateTime.compare(plain, datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainDateTime.from(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => plain.equals(zoned),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => plain.since(zoned),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -17,6 +17,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toZonedDateTime(timeZone),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => plain.until(zoned),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => plain.withPlainDate(zoned),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => plain.withPlainTime(zoned),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,11 +15,11 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainTime.compare(datetime, time),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainTime.compare(time, datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.PlainTime.from(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => time.equals(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => time.since(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => time.toPlainDateTime(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => time.toZonedDateTime({ plainDate: datetime, timeZone: "UTC" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -18,6 +18,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => time.toZonedDateTime({ plainDate, timeZone }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => time.until(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => builtinTimeZone.getInstantFor(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => timeZone.getOffsetStringFor(instant),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => timeZone.getPlainDateTimeFor(instant),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => builtinTimeZone.getPossibleInstantsFor(datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -18,11 +18,11 @@ Temporal.TimeZone.prototype.getPossibleInstantsFor = function () {
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.ZonedDateTime.compare({ year: 2000, month: 5, day: 2, hour: 12, timeZone }, datetime),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.ZonedDateTime.compare(datetime, { year: 2000, month: 5, day: 2, hour: 12, timeZone }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.ZonedDateTime.from({ year: 2000, month: 5, day: 2, hour: 12, offset: "+00:00", timeZone }, { offset: "prefer" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no disambiguation case)`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no disambiguation case)`
|
||||
);
|
||||
|
||||
const badTimeZone = {
|
||||
|
@ -22,11 +22,11 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.ZonedDateTime.from({ year: 2000, month: 5, day: 2, hour: 12, offset: "+00:00", timeZone: badTimeZone }, { offset: "ignore" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=ignore and no possible instants case)`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=ignore and no possible instants case)`
|
||||
);
|
||||
assert.throws(
|
||||
TypeError,
|
||||
() => Temporal.ZonedDateTime.from({ year: 2000, month: 5, day: 2, hour: 12, offset: "+00:00", timeZone: badTimeZone }, { offset: "prefer" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no possible instants case)`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no possible instants case)`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.add(duration),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.day,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.dayOfWeek,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.dayOfYear,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.daysInMonth,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.daysInWeek,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.daysInYear,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -17,6 +17,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.equals({ year: 2000, month: 5, day: 2, hour: 12, timeZone }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.getISOFields(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.hour,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.hoursInDay,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.inLeapYear,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.microsecond,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.millisecond,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.minute,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.month,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.monthCode,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.monthsInYear,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.nanosecond,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.offset,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.offsetNanoseconds,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.round({ smallestUnit: "second" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.second,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -18,6 +18,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.since(properties, { largestUnit: "days" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.since(other, { largestUnit: "days" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.startOfDay(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.subtract(duration),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toJSON(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toPlainDate(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toPlainDateTime(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toPlainMonthDay(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toPlainTime(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toPlainYearMonth(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.toString(),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -18,6 +18,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.until(properties, { largestUnit: "days" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.until(other, { largestUnit: "days" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,6 +14,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.weekOfYear,
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.with({ day: 27 }, { offset: "prefer" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no disambiguation case)`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no disambiguation case)`
|
||||
);
|
||||
|
||||
const badTimeZone = {
|
||||
|
@ -25,11 +25,11 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => badDateTime.with({ day: 27 }, { offset: "ignore" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=ignore and no possible instants case)`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=ignore and no possible instants case)`
|
||||
);
|
||||
assert.throws(
|
||||
TypeError,
|
||||
() => badDateTime.with({ day: 27 }, { offset: "prefer" }),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no possible instants case)`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError (in offset=prefer and no possible instants case)`
|
||||
);
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ features: [BigInt, Symbol, Temporal, arrow-function]
|
|||
assert.throws(
|
||||
TypeError,
|
||||
() => datetime.withPlainDate(other),
|
||||
`Uncallable ${typeof notCallable} ${notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
`Uncallable ${notCallable === null ? 'null' : typeof notCallable} getOffsetNanosecondsFor should throw TypeError`
|
||||
);
|
||||
});
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue