jest-puppe-shots-env

0.7.0 • Public • Published

jest-puppe-shots-env

NPM version node Build Status dependencies Status devDependencies Status peerDependencies Status

A Jest plugin for creating screenshots of React components with a little help of Puppeteer

How it works?

This is the custom Jest Test Environment, Global Teardown and Global Setup hooks for the jest-puppe-shots package.

Check the README to get more information how to use the plugin.

Installation

You can install the plugin using NPM:

npm install jest-puppe-shots-env --save-dev

or by Yarn:

yarn add jest-puppe-shots-env --dev

Jest Configuration

Before starting using the jest-puppe-shots-env you will need to change your Jest configuration file.

Open the jest.config.json file and add additional entries:

{
  "testEnvironment": "jest-puppe-shots-env/lib/node-environment.js",
  "globalSetup": "jest-puppe-shots-env/lib/global-setup.js",
  "globalTeardown": "jest-puppe-shots-env/lib/global-teardown.js"
}

Those hooks are responsible for launching the Puppeteer in the background while the Jest runner is starting.

Package Sidebar

Install

npm i jest-puppe-shots-env

Weekly Downloads

1

Version

0.7.0

License

MIT

Unpacked Size

9.39 kB

Total Files

12

Last publish

Collaborators

  • macku