Skip to content

Commit

Permalink
Bail out of Map/Set test blocks if they don't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 20, 2015
1 parent e9c8b95 commit 8616357
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ describe('Collections', function () {
};

describe('Map', function () {
if (typeof Map === 'undefined') {
return it('exists', function () {
expect(typeof Map).to.equal('function');
});
}

var map;
beforeEach(function () {
map = new Map();
Expand Down Expand Up @@ -604,6 +610,12 @@ describe('Collections', function () {
};

describe('Set', function () {
if (typeof Set === 'undefined') {
return it('exists', function () {
expect(typeof Set).to.equal('function');
});
}

var set;
beforeEach(function () {
set = new Set();
Expand Down

0 comments on commit 8616357

Please sign in to comment.