npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

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.

install

npm i jest-puppe-shots-env

Downloadsweekly downloads

12

version

0.7.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability