Skip to content

Commit

Permalink
"instanceof" is a reserved word in ES3.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 7, 2014
1 parent 0ba86d4 commit 0705b19
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ describe('Collections', function() {
});

it('should allow common ecmascript idioms', function() {
expect(map).to.be.an.instanceof(Map);
expect(Map.prototype.get).to.be.an.instanceof(Function);
expect(Map.prototype.set).to.be.an.instanceof(Function);
expect(Map.prototype.has).to.be.an.instanceof(Function);
expect(Map.prototype['delete']).to.be.an.instanceof(Function);
expect(map instanceof Map).to.equal(true);
expect(typeof Map.prototype.get).to.equal('function');
expect(typeof Map.prototype.set).to.equal('function');
expect(typeof Map.prototype.has).to.equal('function');
expect(typeof Map.prototype['delete']).to.equal('function');
});

it('should has unique constructor', function() {
Expand All @@ -203,8 +203,8 @@ describe('Collections', function() {
map.set('a', 1);
map.set('b', 2);
map.set('c', 3);
expect(map.keys).to.be.an.instanceof(Function);
expect(map.values).to.be.an.instanceof(Function);
expect(typeof map.keys).to.equal('function');
expect(typeof map.values).to.equal('function');
expect(map.size).to.equal(3);
map['delete']('a');
expect(map.size).to.equal(2);
Expand Down Expand Up @@ -541,10 +541,10 @@ describe('Collections', function() {
});

it('should allow common ecmascript idioms', function() {
expect(set).to.be.an.instanceof(Set);
expect(Set.prototype.add).to.be.an.instanceof(Function);
expect(Set.prototype.has).to.be.an.instanceof(Function);
expect(Set.prototype['delete']).to.be.an.instanceof(Function);
expect(set instanceof Set).to.equal(true);
expect(typeof Set.prototype.add).to.equal('function');
expect(typeof Set.prototype.has).to.equal('function');
expect(typeof Set.prototype['delete']).to.equal('function');
});

it('should has unique constructor', function() {
Expand Down

0 comments on commit 0705b19

Please sign in to comment.