Open Tarasikee opened 1 year ago
Simple try/catch
worked for me:
import { expect as jestExpect } from "@jest/globals";
export const expectToMatchSnapshot = async (screenName) => {
try {
await jestExpect(screenName).toMatchImageSnapshot();
} catch (e) {
console.log("not matching snapshot");
}
};
Is there a way to generate diff snapshot even if tests haven't failed?