Skip to content

Commit

Permalink
Whoops, remember to pass indices.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Feb 15, 2016
1 parent ac077ce commit 22f9319
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/arrayChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,11 @@ module.exports = function arrayChanges(actual, expected, equal, similar, include
});
}
});

nonNumericalKeys.forEach(function (key) {
if (key in actual) {
if (key in expected) {
mutatedArray.push({
type: equal(actual[key], expected[key]) ? 'equal' : 'similar',
type: equal(actual[key], expected[key], key, key) ? 'equal' : 'similar',
expectedIndex: key,
actualIndex: key,
value: actual[key],
Expand Down

0 comments on commit 22f9319

Please sign in to comment.