mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:07:34 +00:00
LibJS: Don't coerce this value to object in Promise.prototype.finally()
This commit is contained in:
parent
53ec432e8d
commit
194d90dc72
2 changed files with 14 additions and 4 deletions
|
@ -52,3 +52,11 @@ describe("normal behavior", () => {
|
|||
expect(thenFinallyArg).not.toBe(catchFinallyArg);
|
||||
});
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
test("this value must be an object", () => {
|
||||
expect(() => {
|
||||
Promise.prototype.finally.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "foo is not an object");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue