Skip to content

Commit

Permalink
Skip tests that require Object.getPrototypeOf
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham Fairweather authored and ljharb committed Mar 20, 2017
1 parent 376d4cb commit b1d9b84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('Map', function () {
var functionsHaveNames = (function foo() {}).name === 'foo';
var ifFunctionsHaveNamesIt = functionsHaveNames ? it : xit;
var ifShimIt = (typeof process !== 'undefined' && process.env.NO_ES6_SHIM) ? it.skip : it;
var ifGetPrototypeOfIt = Object.getPrototypeOf ? it : xit;

var range = function range(from, to) {
var result = [];
Expand Down Expand Up @@ -601,11 +602,13 @@ describe('Map', function () {
expect(keys).to.eql(['a', 'd', 'e']);
});

it('MapIterator identification', function () {
ifGetPrototypeOfIt('MapIterator identification test prototype inequality', function () {
var mapEntriesProto = Object.getPrototypeOf(new Map().entries());
var setEntriesProto = Object.getPrototypeOf(new Set().entries());
expect(mapEntriesProto).to.not.equal(setEntriesProto);
});

it('MapIterator identification', function () {
var fnMapValues = Map.prototype.values;
var mapSentinel = new Map([[1, 'MapSentinel']]);
var testMap = new Map();
Expand Down
5 changes: 4 additions & 1 deletion test/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('Set', function () {
var functionsHaveNames = (function foo() {}).name === 'foo';
var ifFunctionsHaveNamesIt = functionsHaveNames ? it : xit;
var ifShimIt = (typeof process !== 'undefined' && process.env.NO_ES6_SHIM) ? it.skip : it;
var ifGetPrototypeOfIt = Object.getPrototypeOf ? it : xit;

var range = function (from, to) {
var result = [];
Expand Down Expand Up @@ -635,11 +636,13 @@ describe('Set', function () {
it.skip('should throw proper errors when user invokes methods with wrong types of receiver', function () {
});

it('SetIterator identification', function () {
ifGetPrototypeOfIt('SetIterator identification test prototype inequality', function () {
var mapEntriesProto = Object.getPrototypeOf(new Map().entries());
var setEntriesProto = Object.getPrototypeOf(new Set().entries());
expect(mapEntriesProto).to.not.equal(setEntriesProto);
});

it('SetIterator identification', function () {
var fnSetValues = Set.prototype.values;
var setSentinel = new Set(['SetSentinel']);
var testSet1 = new Set();
Expand Down

0 comments on commit b1d9b84

Please sign in to comment.