I believe a breaking change was introduced in #298
The diffImageToSnapshot function now accepts what appears to be an optional receivedDir prop but it has no default value so if I update from 5.0.0 to 5.1.0 I now get the above error because undefined is passed to path.join here:
const receivedSnapshotPath = path.join(receivedDir, `${snapshotIdentifier}-received.png`);
For reference, here is how I was calling it before so you can see how receivedDir is undefined
snapshotResult = diffImageToSnapshot({
snapshotsDir,
diffDir,
receivedImageBuffer,
snapshotIdentifier,
failureThreshold,
failureThresholdType,
updateSnapshot: updateSnapshots,
...options,
});
I think that change should either be
- a required argument and a
6.0.0 release
- have some sort of check so it can be optional when not passed
For now, staying on 5.0.0 resolves it
Thanks!
I believe a breaking change was introduced in #298
The
diffImageToSnapshotfunction now accepts what appears to be an optionalreceivedDirprop but it has no default value so if I update from5.0.0to5.1.0I now get the above error becauseundefinedis passed topath.joinhere:For reference, here is how I was calling it before so you can see how
receivedDiris undefinedI think that change should either be
6.0.0releaseFor now, staying on
5.0.0resolves itThanks!