Open Izhaki opened 6 years ago
Had the same problem, thank you for finding this! The workaround I'm using is along these lines:
looksSame(baseline, actual, { ... options }, (err, { equal }) => {
if (equal) return;
looksSame.createDiff({
reference: baseline,
current: actual,
...options
});
);
But I would appreciate an actual fix!
Snippet:
Will throw:
This happens on
looksSame.createDiff()
sincelooksSame()
mutates the options to look like this:PS. Would be grand to have equal returned with createDiff:
looksSame.createDiff(options, function(error, buffer, equal)
would save some of the logic above.