mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:17:45 +00:00
LibJS: Don't coerce this value to object in Promise.resolve()
This commit is contained in:
parent
cd391aa8ef
commit
53ec432e8d
2 changed files with 13 additions and 3 deletions
|
@ -31,3 +31,11 @@ describe("normal behavior", () => {
|
|||
expect(fulfillmentValue).toBe("Some value");
|
||||
});
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
test("this value must be an object", () => {
|
||||
expect(() => {
|
||||
Promise.resolve.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "foo is not an object");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue