jest-image-snapshot icon indicating copy to clipboard operation
jest-image-snapshot copied to clipboard

toMatchImageSnapshot & typescript [doubt]

Open DiegoFBenavides opened this issue 5 years ago • 2 comments

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

DiegoFBenavides avatar Feb 15 '21 16:02 DiegoFBenavides

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

github-actions[bot] avatar Mar 18 '21 00:03 github-actions[bot]

remove toMatchImageSnapshot from the import

gaitat avatar Apr 02 '21 17:04 gaitat