Skip to content

Allow overriding failure threshold per test #72

@mihkeleidast

Description

@mihkeleidast

Same as #15, but that was closed a few years ago, so filing a new issue seems reasonable.

Again, I'm trying to migrate from jest-image-snapshot. That lib allows specifying threshold and other options through the matcher, like so:

expect(screenshot).toMatchImageSnapshot({
    failureThreshold: 0.0004,
    failureThresholdType: 'percent',
});

Wondering if you would support something similar? The reasoning is quite obvious - some screenshot tests are quite flaky when run through Chrome/Puppeteer, so in some rare cases we raise the failure threshold so tests wouldn't fail all the time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions