Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable configuration overrides via matcher #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chrismansfield
Copy link

This adds the possibility to override the settings detectAntialiasing, colorThreshold, pixelThresholdAbsolute and pixelThresholdRelative via parameters to the matcher;

expect(myFlakyImage).toMatchImageSnapshot({
       detectAntialiasing: true,
       colorThreshold: 0.1,
       pixelThresholdAbsolute: 25,
       pixelThresholdRelative: 0.1
});

This fixes #72

@chrismansfield chrismansfield force-pushed the enable-configuration-overrides-via-matcher branch from 789f6ea to 8110196 Compare October 25, 2021 17:25
@Prior99
Copy link
Owner

Prior99 commented Nov 19, 2021

I am currently very busy, I am sorry that I did not yet have the time to review this :(

@tujoworker
Copy link
Contributor

Thanks for the PR! This looks promising 🙌 very good work @chrismansfield

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow overriding failure threshold per test
3 participants