# jest-puppe-shots-env

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

Latest version **0.7.0** (published 2018-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install jest-puppe-shots-env
pnpm add jest-puppe-shots-env
yarn add jest-puppe-shots-env
bun add jest-puppe-shots-env
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2018-03-09 |
| First published | 2018-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 7.6 |
| Dependencies | 8 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 84 |
| Author | Maciej Adamczak |
| Maintainers | macku |
| Keywords | jest, screenshot, snapshot, testing, unittest, react, enzyme, javascript, visual-regression, visual-testing, matcher, jest-matcher, unit-testing, puppeteer, chrome |

## Links

- npm: https://www.npmjs.com/package/jest-puppe-shots-env
- Repository: https://github.com/macku/jest-puppe-shots
- Homepage: https://github.com/macku/jest-puppe-shots#readme
- Issues: https://github.com/macku/jest-puppe-shots/issues
- npm.io page: https://npm.io/package/jest-puppe-shots-env

## Dependencies (8)

- [rimraf](https://npm.io/package/rimraf.md) ^2.6.2
- [express](https://npm.io/package/express.md) ^4.16.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [get-port](https://npm.io/package/get-port.md) ^3.2.0
- [puppeteer](https://npm.io/package/puppeteer.md) ^1.1.1
- [http-shutdown](https://npm.io/package/http-shutdown.md) ^1.2.0
- [jest-environment-node](https://npm.io/package/jest-environment-node.md) >=22.0.0
- [jest-environment-jsdom](https://npm.io/package/jest-environment-jsdom.md) >=22.0.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.7.0 (latest) — 2018-03-09
- 0.5.1 (beta) — 2018-03-05
- 0.6.0 — 2018-03-05
- 0.5.0 — 2018-03-05

## README

jest-puppe-shots-env
=====================

[![NPM version](https://badge.fury.io/js/jest-puppe-shots-env.svg)](https://www.npmjs.com/package/jest-puppe-shots-env)
[![node](https://img.shields.io/node/v/jest-puppe-shots-env.svg)](https://www.npmjs.com/package/jest-puppe-shots-env)
[![Build Status](https://travis-ci.org/macku/jest-puppe-shots.svg?branch=master)](https://travis-ci.org/macku/jest-puppe-shots)
[![dependencies Status](https://david-dm.org/macku/jest-puppe-shots/status.svg?path=packages/jest-puppe-shots-env)](https://david-dm.org/macku/jest-puppe-shots?path=packages/jest-puppe-shots-env)
[![devDependencies Status](https://david-dm.org/macku/jest-puppe-shots/dev-status.svg?path=packages/jest-puppe-shots-env)](https://david-dm.org/macku/jest-puppe-shots?path=packages/jest-puppe-shots-env&type=dev)
[![peerDependencies Status](https://david-dm.org/macku/jest-puppe-shots/peer-status.svg?path=packages/jest-puppe-shots-env)](https://david-dm.org/macku/jest-puppe-shots?path=packages/jest-puppe-shots-env&type=peer)

A [Jest](https://facebook.github.io/jest/) plugin for creating screenshots of [React](https://reactjs.org/) components with a little help of [Puppeteer](https://github.com/GoogleChrome/puppeteer)

How it works?
=============
This is the custom Jest [Test Environment](https://facebook.github.io/jest/docs/en/configuration.html#testenvironment-string),
[Global Teardown](https://facebook.github.io/jest/docs/en/configuration.html#globalteardown-string) and
[Global Setup](https://facebook.github.io/jest/docs/en/configuration.html#globalsetup-string) hooks for the
[`jest-puppe-shots`](https://www.npmjs.com/package/jest-puppe-shots) package.

Check the [README](https://https://github.com/macku/jest-puppe-shots/blob/master/README.md) to get more information how to use the plugin.

Installation
============

You can install the plugin using [**NPM**](https://www.npmjs.com):

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

or by [**Yarn**](https://yarnpkg.com/):

```bash
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:

```json
{
  "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.

---
_Source: https://npm.io/package/jest-puppe-shots-env · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
