Skip to content

The Argument of toMatchImageSnapshot() needs "imageConfig" key. #116

Closed
@hisomura

Description

@hisomura

@wolfi3b reported this in #54 (comment)

If you change toMatchImageSnapshot() setting According to README.md and toMatchImageSnapshot.spec.js, you would write code like below.

cy.visit('/static/stub.html').then(() => {
  cy.document().toMatchImageSnapshot({
    createDiffImage: false,
    threshold: 10000,
    thresholdType: 'pixel',
    name: 'foobar'
  });
});

But it never works as expected. Actually the real implementation needs "imageConfig" key. The Following works expectedly.

cy.visit('/static/stub.html').then(() => {
  cy.document().toMatchImageSnapshot({
    imageConfig: {
      createDiffImage: false,
      threshold: 10000,
      thresholdType: 'pixel',
    },
    name: 'foobar'
  });
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @hisomura

      Issue actions

        The Argument of toMatchImageSnapshot() needs "imageConfig" key. · Issue #116 · meinaart/cypress-plugin-snapshots