Add keys() accessor to EnumerableMaps (#3920)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Hadrien Croubois
2023-01-03 22:25:37 +01:00
committed by GitHub
parent 2fc24fc8d4
commit 88754d0b36
5 changed files with 147 additions and 10 deletions

View File

@ -36,6 +36,13 @@ function shouldBehaveLikeMap (
}))).to.have.same.deep.members(
zip(keys.map(k => k.toString()), values.map(v => v.toString())),
);
// This also checks that both arrays have the same length
expect(
(await methods.keys(map)).map(k => k.toString()),
).to.have.same.members(
keys.map(key => key.toString()),
);
}
it('starts empty', async function () {