Skip to content

Commit

Permalink
Unbreak CI + remove dead code from Jasmine/Jest.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed Jun 7, 2017
1 parent d2cae59 commit b254715
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions packages/jest-matchers/src/jasmine-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,6 @@ function eq(a, b, aStack, bStack, customTesters): boolean {
return false;
}
}
} else {
// Objects with different constructors are not equivalent, but `Object`s
// or `Array`s from different frames are.
// CUSTOM JEST CHANGE:
// TODO(cpojer): fix all tests and this and re-enable this check
/*
var aCtor = a.constructor, bCtor = b.constructor;
if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
isFunction(bCtor) && bCtor instanceof bCtor)) {
return false;
}
*/
}

// Deep compare objects.
Expand Down Expand Up @@ -207,15 +195,14 @@ function eq(a, b, aStack, bStack, customTesters): boolean {
}

function keys(obj, isArray) {
// CUSTOM JEST CHANGE: don't consider undefined keys.
var allKeys = (function(o) {
var keys = [];
for (var key in o) {
if (has(o, key)) {
keys.push(key);
}
}
return keys.concat(Object.getOwnPropertySymbols(o));
return keys.concat((Object.getOwnPropertySymbols(o): Array<any>));
})(obj);

if (!isArray) {
Expand All @@ -237,8 +224,6 @@ function keys(obj, isArray) {
}

function has(obj, key) {
// CUSTOM JEST CHANGE:
// TODO(cpojer): remove the `obj[key] !== undefined` check.
return (
Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== undefined
);
Expand Down

0 comments on commit b254715

Please sign in to comment.