Skip to content

Commit

Permalink
IE 11 has native Map/Set, but it takes an optional *function*, no…
Browse files Browse the repository at this point in the history
…t an optional iterable, in the constructor.

(wtf?)
  • Loading branch information
ljharb committed May 29, 2015
1 parent cf2558a commit 0ad74b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ describe('Collections', function () {
it('should accept an iterable as argument', function () {
testMapping(map, 'a', 'b');
testMapping(map, 'c', 'd');
var map2 = new Map(map);
var map2;
expect(function () { map2 = new Map(map); }).not.to['throw'](Error);
expect(map2).to.be.an.instanceOf(Map);
expect(map2.has('a')).to.equal(true);
expect(map2.has('c')).to.equal(true);
expect(map2).to.have.entries([['a', 'b'], ['c', 'd']]);
Expand Down

0 comments on commit 0ad74b6

Please sign in to comment.