mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:04:57 +00:00
LibJS: Change wording of ErrorType::NotA to be independent of context
Currently, we have NotA and NotAn, to be used dependent on whether the following word begins with a vowel or not. To avoid this, change the wording on NotA to be independent of this context.
This commit is contained in:
parent
0398089275
commit
76589d6728
169 changed files with 171 additions and 171 deletions
|
@ -57,7 +57,7 @@
|
|||
M(JsonMalformed, "Malformed JSON string") \
|
||||
M(NegativeExponent, "Exponent must be positive") \
|
||||
M(NonExtensibleDefine, "Cannot define property {} on non-extensible object") \
|
||||
M(NotA, "Not a {} object") \
|
||||
M(NotA, "Not an object of type {}") \
|
||||
M(NotAConstructor, "{} is not a constructor") \
|
||||
M(NotAFunction, "{} is not a function") \
|
||||
M(NotAFunctionNoParam, "Not a function") \
|
||||
|
|
|
@ -6,5 +6,5 @@ test("basic functionality", () => {
|
|||
test("calling with non-BigInt |this|", () => {
|
||||
expect(() => {
|
||||
BigInt.prototype.toLocaleString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a BigInt object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type BigInt");
|
||||
});
|
||||
|
|
|
@ -6,5 +6,5 @@ test("basic functionality", () => {
|
|||
test("calling with non-BigInt |this|", () => {
|
||||
expect(() => {
|
||||
BigInt.prototype.toString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a BigInt object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type BigInt");
|
||||
});
|
||||
|
|
|
@ -7,5 +7,5 @@ test("basic functionality", () => {
|
|||
test("calling with non-BigInt |this|", () => {
|
||||
expect(() => {
|
||||
BigInt.prototype.valueOf.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a BigInt object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type BigInt");
|
||||
});
|
||||
|
|
|
@ -13,5 +13,5 @@ test("basic functionality", () => {
|
|||
test("errors on non-boolean |this|", () => {
|
||||
expect(() => {
|
||||
Boolean.prototype.toString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Boolean object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Boolean");
|
||||
});
|
||||
|
|
|
@ -12,5 +12,5 @@ test("basic functionality", () => {
|
|||
test("errors on non-boolean |this|", () => {
|
||||
expect(() => {
|
||||
Boolean.prototype.valueOf.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Boolean object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Boolean");
|
||||
});
|
||||
|
|
|
@ -10,6 +10,6 @@ describe("errors", () => {
|
|||
test("this value must be a Date object", () => {
|
||||
expect(() => {
|
||||
Date.prototype.toTemporalInstant.call(123);
|
||||
}).toThrowWithMessage(TypeError, "Not a Date object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Date");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -144,6 +144,6 @@ describe("errors", () => {
|
|||
test("does not accept non-function values", () => {
|
||||
expect(() => {
|
||||
Function.prototype.bind.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Function object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Function");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ describe("errors", () => {
|
|||
test("called on non-ListFormat object", () => {
|
||||
expect(() => {
|
||||
Intl.ListFormat.prototype.format([]);
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.ListFormat object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.ListFormat");
|
||||
});
|
||||
|
||||
test("called with non-string iterable", () => {
|
||||
|
|
|
@ -4,7 +4,7 @@ describe("errors", () => {
|
|||
test("called on non-ListFormat object", () => {
|
||||
expect(() => {
|
||||
Intl.ListFormat.prototype.formatToParts([]);
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.ListFormat object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.ListFormat");
|
||||
});
|
||||
|
||||
test("called with non-string iterable", () => {
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.baseName;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.calendar;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.caseFirst;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.collation;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.hourCycle;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.language;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.numberingSystem;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.numeric;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.region;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called on non-Locale object", () => {
|
||||
expect(() => {
|
||||
Intl.Locale.prototype.script;
|
||||
}).toThrowWithMessage(TypeError, "Not a Intl.Locale object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Intl.Locale");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("errors", () => {
|
|||
[true, [], {}, Symbol("foo"), "bar", 1n].forEach(value => {
|
||||
expect(() => Number.prototype.toFixed.call(value)).toThrowWithMessage(
|
||||
TypeError,
|
||||
"Not a Number object"
|
||||
"Not an object of type Number"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -77,7 +77,7 @@ describe("errors", () => {
|
|||
[true, [], {}, Symbol("foo"), "bar", 1n].forEach(value => {
|
||||
expect(() => Number.prototype.toString.call(value)).toThrowWithMessage(
|
||||
TypeError,
|
||||
"Not a Number object"
|
||||
"Not an object of type Number"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ describe("errors", () => {
|
|||
[true, [], {}, Symbol("foo"), "bar", 1n].forEach(value => {
|
||||
expect(() => Number.prototype.valueOf.call(value)).toThrowWithMessage(
|
||||
TypeError,
|
||||
"Not a Number object"
|
||||
"Not an object of type Number"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ describe("errors", () => {
|
|||
test("this value must be a Promise", () => {
|
||||
expect(() => {
|
||||
Promise.prototype.then.call({});
|
||||
}).toThrowWithMessage(TypeError, "Not a Promise");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Promise");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -11,5 +11,5 @@ test("basic functionality", () => {
|
|||
test("|this| must be a symbol", () => {
|
||||
expect(() => {
|
||||
Symbol.prototype.valueOf.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Symbol object");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Symbol");
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Calendar object", () => {
|
||||
expect(() => {
|
||||
Temporal.Calendar.prototype.era.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Calendar");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Calendar");
|
||||
});
|
||||
|
||||
test("argument must be date-like", () => {
|
||||
|
|
|
@ -14,7 +14,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Calendar object", () => {
|
||||
expect(() => {
|
||||
Temporal.Calendar.prototype.eraYear.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Calendar");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Calendar");
|
||||
});
|
||||
|
||||
test("argument must be date-like", () => {
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Calendar object", () => {
|
||||
expect(() => {
|
||||
Temporal.Calendar.prototype.fields.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Calendar");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Calendar");
|
||||
});
|
||||
|
||||
test("iterator values must be strings", () => {
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Calendar object", () => {
|
||||
expect(() => {
|
||||
Temporal.Calendar.prototype.mergeFields.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Calendar");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Calendar");
|
||||
});
|
||||
|
||||
test("fields argument must be coercible to object", () => {
|
||||
|
|
|
@ -13,6 +13,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Calendar object", () => {
|
||||
expect(() => {
|
||||
Temporal.Calendar.prototype.toString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Calendar");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Calendar");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -48,6 +48,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Temporal.Duration.prototype.abs.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,6 +12,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "blank", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "days", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "hours", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "microseconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "milliseconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "minutes", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "months", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "nanoseconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -37,6 +37,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Temporal.Duration.prototype.negated.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "seconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,6 +12,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "sign", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "weeks", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -42,7 +42,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Temporal.Duration.prototype.with.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
|
||||
test("argument is not an object", () => {
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Duration object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Duration.prototype, "years", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Duration");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Duration");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.add.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
|
||||
test("invalid nanoseconds value, positive", () => {
|
||||
|
|
|
@ -29,6 +29,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochMicroseconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,6 +28,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochMilliseconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -20,6 +20,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochNanoseconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,6 +28,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.Instant.prototype, "epochSeconds", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.equals.call("foo", 1, 2);
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.round.call("foo", {});
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
|
||||
test("missing options object", () => {
|
||||
|
|
|
@ -15,6 +15,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.since.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.subtract.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
|
||||
test("invalid nanoseconds value, positive", () => {
|
||||
|
|
|
@ -13,6 +13,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.toJSON.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,6 +13,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.toLocaleString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -60,6 +60,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.toString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.toZonedDateTime.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
|
||||
test("items argument must be an object", () => {
|
||||
|
|
|
@ -32,6 +32,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.toZonedDateTimeISO.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.Instant object", () => {
|
||||
expect(() => {
|
||||
Temporal.Instant.prototype.until.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.Instant");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.Instant");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -10,6 +10,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "calendar", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "day", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "dayOfWeek", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "dayOfYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "daysInMonth", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "daysInWeek", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "daysInYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -19,6 +19,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "era", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -19,6 +19,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "eraYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -11,6 +11,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "inLeapYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "month", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "monthCode", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "monthsInYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -18,6 +18,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainDate.prototype.toJSON.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -18,6 +18,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainDate.prototype.toLocaleString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Temporal.PlainDate.prototype.toString.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
|
||||
test("calendarName option must be one of 'auto', 'always', 'never'", () => {
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "weekOfYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDate object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDate.prototype, "year", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDate");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -10,6 +10,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "calendar", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "day", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "dayOfWeek", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "dayOfYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "daysInMonth", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "daysInWeek", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "daysInYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -19,6 +19,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "era", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -19,6 +19,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "eraYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "hour", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "inLeapYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "microsecond", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "millisecond", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "minute", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "month", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "monthCode", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "monthsInYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "nanosecond", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "second", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "weekOfYear", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainDateTime object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainDateTime.prototype, "year", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainDateTime");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainDateTime");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -10,6 +10,6 @@ describe("errors", () => {
|
|||
test("this value must be a Temporal.PlainMonthDay object", () => {
|
||||
expect(() => {
|
||||
Reflect.get(Temporal.PlainMonthDay.prototype, "calendar", "foo");
|
||||
}).toThrowWithMessage(TypeError, "Not a Temporal.PlainMonthDay");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type Temporal.PlainMonthDay");
|
||||
});
|
||||
});
|
||||
|
|
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