Skip to content

Commit

Permalink
Adding a passing test for creating a Set from an array. Closes #246
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 29, 2014
1 parent 5d8621f commit e652595
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ describe('Collections', function() {
expect(Array.from(set2.entries())).to.be.eql([['a','a'],['b','b']]);
});

it('accepts an array as an argument', function() {
var arr = ['a', 'b', 'c'];
var set = new Set(arr);
expect(Array.from(set.values())).to.be.eql(arr);
});

it('should not be callable without "new"', function() {
expect(Set).to.throw(TypeError);
});
Expand Down

0 comments on commit e652595

Please sign in to comment.