src/utilities/get-boxes-around.spec.js
function isMatching(result, expectation) {
  if (result.length !== expectation.length) {
    return false;
  }

  // convert results and expectations to strings for easier comparison
  result = result.map(item => item.toString());
  expectation = expectation.map(item => getBox(item).toString());

  const reduce_callback = function (previous_result, current_item) {
    return previous_result === true && result.indexOf(current_item) > -1;
  };

  return expectation.reduce(reduce_callback, true);
}
function isMatching(result, expectation) {
  if (result.length !== expectation.length) {
    return false;
  }

  // convert results and expectations to strings for easier comparison
  result = result.map(item => item.toString());
  expectation = expectation.map(item => getBox(item).toString());

  const reduce_callback = function (previous_result, current_item) {
    return previous_result === true && result.indexOf(current_item) > -1;
  };

  return expectation.reduce(reduce_callback, true);
}
function isMatching ( result , expectation ) { if ( result . length !== expectation . length ) { return false ; } // convert results and expectations to strings for easier comparison result = result . map ( item => item . toString ( ) ) ; expectation = expectation . map ( item => getBox ( item ) . toString ( ) ) ; const reduce_callback = function ( previous_result , current_item ) { return previous_result === true && result . indexOf ( current_item ) > - 1 ; } ; return expectation . reduce ( reduce_callback , true ) ; }
helper function that compares length and values of expectations
helper function that compares length and values of expectations