Skip to content

Commit

Permalink
use isA instead of instanceof
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelzor committed Sep 13, 2017
1 parent 8d4f461 commit a8988c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/expect/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @flow
*/

import {equals} from './jasmine_utils';
import {equals, isA} from './jasmine_utils';

type GetPath = {
hasEndProp?: boolean,
Expand Down Expand Up @@ -114,7 +114,7 @@ export const iterableEquality = (a: any, b: any) => {
if (a.size !== undefined) {
if (a.size !== b.size) {
return false;
} else if (a instanceof Set) {
} else if (isA('Set', a)) {
let allFound = true;
for (const aValue of a) {
if (!b.has(aValue)) {
Expand All @@ -125,7 +125,7 @@ export const iterableEquality = (a: any, b: any) => {
if (allFound) {
return true;
}
} else if (a instanceof Map) {
} else if (isA('Map', a)) {
let allFound = true;
for (const aEntry of a) {
if (
Expand Down

0 comments on commit a8988c6

Please sign in to comment.