mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +00:00
LibJS/Tests: Fix bad copy and paste that crept into a lot of tests
The top-level function should have been `describe()``, but instead it's been nested `test()`s.
This commit is contained in:
parent
1927dbf025
commit
a8ba2f4b21
109 changed files with 109 additions and 109 deletions
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Date object", () => {
|
||||
expect(() => {
|
||||
Date.prototype.toTemporalInstant.call(123);
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("must be called with numeric |this|", () => {
|
||||
[true, [], {}, Symbol("foo"), "bar", 1n].forEach(value => {
|
||||
expect(() => Number.prototype.toFixed.call(value)).toThrowWithMessage(
|
||||
|
|
|
@ -72,7 +72,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("must be called with numeric |this|", () => {
|
||||
[true, [], {}, Symbol("foo"), "bar", 1n].forEach(value => {
|
||||
expect(() => Number.prototype.toString.call(value)).toThrowWithMessage(
|
||||
|
|
|
@ -9,7 +9,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("must be called with numeric |this|", () => {
|
||||
[true, [], {}, Symbol("foo"), "bar", 1n].forEach(value => {
|
||||
expect(() => Number.prototype.valueOf.call(value)).toThrowWithMessage(
|
||||
|
|
|
@ -9,7 +9,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Calendar object", () => {
|
||||
expect(() => {
|
||||
Temporal.Calendar.prototype.toString.call("foo");
|
||||
|
|
|
@ -44,7 +44,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Temporal.Duration.prototype.abs.call("foo");
|
||||
|
|
|
@ -8,7 +8,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "blank", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "days", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "hours", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "microseconds", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "milliseconds", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "minutes", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "months", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "nanoseconds", "foo");
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Temporal.Duration.prototype.negated.call("foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "seconds", "foo");
|
||||
|
|
|
@ -8,7 +8,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "sign", "foo");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("throws TypeError", () => {
|
||||
expect(() => {
|
||||
new Temporal.Duration().valueOf();
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "weeks", "foo");
|
||||
|
|
|
@ -38,7 +38,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Temporal.Duration.prototype.with.call("foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "years", "foo");
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("argument must be coercible to BigInt", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.fromEpochMicroseconds(123);
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("argument must be coercible to BigInt", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.fromEpochMilliseconds(1.23);
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("argument must be coercible to BigInt", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.fromEpochNanoseconds(123);
|
||||
|
|
|
@ -20,7 +20,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("argument must be coercible to BigInt", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.fromEpochSeconds(1.23);
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochMicroseconds", "foo");
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochMilliseconds", "foo");
|
||||
|
|
|
@ -16,7 +16,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochNanoseconds", "foo");
|
||||
|
|
|
@ -24,7 +24,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochSeconds", "foo");
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.equals.call("foo", 1, 2);
|
||||
|
|
|
@ -19,7 +19,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.round.call("foo", {});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("throws TypeError", () => {
|
||||
expect(() => {
|
||||
new Temporal.Instant(0n).valueOf();
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "calendar", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "day", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "dayOfWeek", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "dayOfYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "daysInMonth", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "daysInWeek", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "daysInYear", "foo");
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "inLeapYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "month", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "monthCode", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "monthsInYear", "foo");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("throws TypeError", () => {
|
||||
expect(() => {
|
||||
new Temporal.PlainDate(2021, 7, 21).valueOf();
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "weekOfYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "year", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "calendar", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "day", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "dayOfWeek", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "dayOfYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "daysInMonth", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "daysInWeek", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "daysInYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "hour", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "inLeapYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "microsecond", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "millisecond", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "minute", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "month", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "monthCode", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "monthsInYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "nanosecond", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "second", "foo");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("throws TypeError", () => {
|
||||
expect(() => {
|
||||
new Temporal.PlainDateTime(2021, 7, 22, 19, 54, 38).valueOf();
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "weekOfYear", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "year", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "calendar", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "hour", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "microsecond", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "millisecond", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "minute", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "nanosecond", "foo");
|
||||
|
|
|
@ -5,7 +5,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.PlainTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainTime.prototype, "second", "foo");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("throws TypeError", () => {
|
||||
expect(() => {
|
||||
new Temporal.PlainTime(19, 54, 38).valueOf();
|
||||
|
|
|
@ -16,7 +16,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.TimeZone object", () => {
|
||||
expect(() => {
|
||||
Temporal.TimeZone.prototype.getOffsetNanosecondsFor.call("foo");
|
||||
|
|
|
@ -16,7 +16,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.TimeZone object", () => {
|
||||
expect(() => {
|
||||
Temporal.TimeZone.prototype.getOffsetStringFor.call("foo");
|
||||
|
|
|
@ -9,7 +9,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.TimeZone object", () => {
|
||||
expect(() => {
|
||||
Temporal.TimeZone.prototype.toString.call("foo");
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "calendar", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "day", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "dayOfWeek", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "dayOfYear", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "daysInMonth", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "daysInWeek", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "daysInYear", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "epochMicroseconds", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "epochMilliseconds", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "epochNanoseconds", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "epochSeconds", "foo");
|
||||
|
|
|
@ -40,7 +40,7 @@ describe("normal behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Temporal.ZonedDateTime.prototype.getISOFields.call("foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "hour", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "inLeapYear", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "microsecond", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "millisecond", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "minute", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "month", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "monthCode", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "monthsInYear", "foo");
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "nanosecond", "foo");
|
||||
|
|
|
@ -12,7 +12,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "offset", "foo");
|
||||
|
|
|
@ -12,7 +12,7 @@ describe("correct behavior", () => {
|
|||
});
|
||||
});
|
||||
|
||||
test("errors", () => {
|
||||
describe("errors", () => {
|
||||
test("this value must be a Temporal.ZonedDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.ZonedDateTime.prototype, "offsetNanoseconds", "foo");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue