Make all your test
s create and open a screenshot automatically after failing:
import { takeScreenshotOnTestError } from "@error-paparazzi/jest";
takeScreenshotOnTestError();
test("failing test", () => {
expect(true).toBe(false);
});
Wrap single test in paparazzi
:
import { paparazzi } from "@error-paparazzi/jest";
test("failing test", paparazzi(() => {
expect(true).toBe(false);
}));
Explicitly trigger a screenshot whenever you want to:
import { screenshot } from "@error-paparazzi/jest";
test("failing test", () => {
await screenshot();
expect(true).toBe(false);
});