How to use react-screenshot-test - 1 common examples

To help you get started, we’ve selected a few react-screenshot-test examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fwouts / react-screenshot-test / example / FancyButton.screenshot.jsx View on Github external
import React from "react";
import { ReactScreenshotTest } from "react-screenshot-test";
import { FancyButton } from "./FancyButton";
import "./global.css";
import { redLabel } from "./style.module.css";

ReactScreenshotTest.create("FancyButton")
  .viewport("Desktop", {
    width: 1024,
    height: 768
  })
  .viewport("iPhone X", {
    width: 375,
    height: 812,
    deviceScaleFactor: 3,
    isMobile: true,
    hasTouch: true,
    isLandscape: false
  })
  .shoot("with label", )
  .shoot("empty label", )
  .shoot(
    "custom label",

react-screenshot-test

Here's a [real example](https://github.com/fwouts/react-screenshot-test/pull/18/files?short_path=9fa0253#diff-9fa0253d6c3a2b1cf8ec498eec18360e) of a pull request where a component was changed: [![Example PR](example-pr.png)](https://github.com/fwouts/reac

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis

Popular react-screenshot-test functions

Similar packages