mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibJS: Use undefined as the fallback value for iterable entry key/value
As defined in OdinaryGet in the specification.
This commit is contained in:
parent
c0e04768e0
commit
3c83298a26
2 changed files with 11 additions and 2 deletions
|
@ -32,3 +32,11 @@ describe("normal behavior", () => {
|
|||
expect(a instanceof WeakMap).toBeTrue();
|
||||
});
|
||||
});
|
||||
|
||||
describe("regressions", () => {
|
||||
test("missing key/value properties on iterable entry", () => {
|
||||
expect(() => {
|
||||
new WeakMap([{}]);
|
||||
}).toThrowWithMessage(TypeError, "undefined is not an object");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue