Skip to content

Commit

Permalink
Cleaning up "#size" and "#clear()" test structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 11, 2014
1 parent 7cabf05 commit c405863
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,20 +508,24 @@ describe('Collections', function() {
}
});

it('should has #size', function() {
set.add(1);
set.add(5);
expect(set.size).to.equal(2);
});

it('should has #clear method', function() {
set.add(1);
set.add(5);
expect(set.size).to.equal(2);
expect(set.has(5)).to.equal(true);
set.clear();
expect(set.size).to.equal(0);
expect(set.has(5)).to.equal(false);
describe('#size', function() {
it('returns the expected size', function() {
set.add(1);
set.add(5);
expect(set.size).to.equal(2);
});
});

describe('#clear()', function() {
it('should have #clear method', function() {
set.add(1);
set.add(5);
expect(set.size).to.equal(2);
expect(set.has(5)).to.equal(true);
set.clear();
expect(set.size).to.equal(0);
expect(set.has(5)).to.equal(false);
});
});

it('should allow NaN values as keys', function() {
Expand Down

0 comments on commit c405863

Please sign in to comment.