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

toMatchImageSnapshot & typescript [doubt] #253

Open
DiegoFBenavides opened this issue Feb 15, 2021 · 2 comments
Open

toMatchImageSnapshot & typescript [doubt] #253

DiegoFBenavides opened this issue Feb 15, 2021 · 2 comments
Labels

Comments

@DiegoFBenavides
Copy link

Hi! I´m using the custom config to catch my snapshot but also I´m trying to move mi project to Typescript and I cannot solve the next problem.
"Cannot assign to 'toMatchImageSnapshot' because it is not a variable."
and the part of my code something like...
import {toMatchImageSnapshot, configureToMatchImageSnapshot} from "jest-image-snapshot";

const customConfig = { threshold: 0.5};
toMatchImageSnapshot = configureToMatchImageSnapshot({
customDiffConfig: customConfig,
noColors: true,
failureThreshold: 0.01,
failureThresholdType: 'percent',
customSnapshotsDir: "./image_snapshots/"+deviceName,
});
expect.extend({ toMatchImageSnapshot });

Someone has any idea to solve? THX

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity.

@gaitat
Copy link

gaitat commented Apr 2, 2021

remove toMatchImageSnapshot from the import

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

No branches or pull requests

3 participants