elpassion / error-paparazzi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error-paparazzi

Usage

Make all your tests 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);
});

About


Languages

Language:TypeScript 100.0%