mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
LibJS: Replace some is_nullish() checks with require_object_coercible()
This commit is contained in:
parent
cd12b2aa57
commit
3cfd9f51f7
2 changed files with 13 additions and 22 deletions
|
@ -30,10 +30,10 @@ test("casts |this| to string", () => {
|
|||
|
||||
expect(() => {
|
||||
String.prototype[Symbol.iterator].call(null);
|
||||
}).toThrowWithMessage(TypeError, "ToObject on null or undefined");
|
||||
}).toThrowWithMessage(TypeError, "null cannot be converted to an object");
|
||||
expect(() => {
|
||||
String.prototype[Symbol.iterator].call(undefined);
|
||||
}).toThrowWithMessage(TypeError, "ToObject on null or undefined");
|
||||
}).toThrowWithMessage(TypeError, "undefined cannot be converted to an object");
|
||||
});
|
||||
|
||||
test("utf8 compatible", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue