Skip to content

Commit

Permalink
Add test to show objects with null prototypes work as key
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Champion authored and JakeChampion committed Feb 19, 2019
1 parent 18dfee3 commit c14fe63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions polyfills/Map/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,12 @@ describe('Map', function () {
proclaim.ok(o.has(0));
proclaim.equal(o.get(-0), generic);
proclaim.equal(o.get(0), generic);
if ('create' in Object) {
var o = new Map();
var key = Object.create(null);
o.set(key, key);
proclaim.equal(o.get(key), key);
}
});

it("implements .delete()", function () {
Expand Down

0 comments on commit c14fe63

Please sign in to comment.