cypress-match-screenshot
cypress-match-screenshot copied to clipboard
how to set threshold for blinkdiff
currently tests passes for :
so wanted to set the threshold from some configuration , is it possible currently ?
const threshold = argv.threshold ? parseFloat(argv.threshold) : 0.005;
tried npm run cy:run --threshold 0
Thanks in advance!
I added the threshold as option to the command, so you can do sth like this now:
cy.matchScreenshot('fileName', { threshold: 0 })
Let me know if that works for you and feel free to reopen the issue if it doesn't 😊
Hi .. sorry was a little away from work.
I tried your fix but its not working, threshold is not getting accepted.
Also
filename is appended with default threshold value.
https://github.com/julianburr/cypress-match-screenshot/blob/1fc0ae88449952f43b848bae897977fc125efbac/src/index.js#L88 need to give space while passing threshold.
@chit786 you're absolutely right, my bad ... try again with v0.0.5 😊