Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taehwanno/jest-image-snapshot-example
Jest Image Snapshot Example with puppeteer and Circle CI
https://github.com/taehwanno/jest-image-snapshot-example
circleci jest jest-image-snapshot jest-snapshots puppeteer visual-regression
Last synced: 2 months ago
JSON representation
Jest Image Snapshot Example with puppeteer and Circle CI
- Host: GitHub
- URL: https://github.com/taehwanno/jest-image-snapshot-example
- Owner: taehwanno
- License: mit
- Created: 2017-08-17T02:12:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-20T02:45:34.000Z (over 2 years ago)
- Last Synced: 2023-02-27T06:05:48.737Z (almost 2 years ago)
- Topics: circleci, jest, jest-image-snapshot, jest-snapshots, puppeteer, visual-regression
- Language: JavaScript
- Homepage:
- Size: 63.5 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jest-image-snapshot-example [![Build Status](https://circleci.com/gh/taehwanno/jest-image-snapshot-example.svg?style=shield&circle-token=29400e7bd43d764abe44e65bd1dd61d773b4e32d)](https://circleci.com/gh/taehwanno/jest-image-snapshot-example)
Jest Image Snapshot Example with [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot), [puppeteer](https://github.com/GoogleChrome/puppeteer) and [Circle CI](https://circleci.com/) 2.0 for Visual Regression Test
# Prerequisite
- node >= `v7.6.0`
- jest >= `v20.0.0`
- yarnThis project assumes node.js version with `v8.4.0`.
# Installation
```bash
$ npm install
```# Test
First, run server.
```bash
$ npm start
```and open another terminal, run test script.
```bash
$ npm test
```To update snapshot image file, run test with `-u`
```bash
$ npm test -- -u
```# [GoogleChrome/puppeteer #290 Issue](https://github.com/GoogleChrome/puppeteer/issues/290) with Circle CI
In Circle CI Ubuntu 14.04 (Trusty), you should additionally install [required dependencies](https://github.com/GoogleChrome/puppeteer/issues/290#issuecomment-322838700).
## Workaround Implementation
- [./scripts/workaround-puppeteer-issue-290.sh](./scripts/workaround-puppeteer-issue-290.sh)
- [./.circleci/config.yml](https://github.com/taehwanno/jest-image-snapshot-example/blob/86f15156785171695b616568e91dd115dad08a59/.circleci/config.yml#L22-L24)## References
- https://github.com/GoogleChrome/puppeteer/pull/311
- https://github.com/Quramy/puppeteer-example# License
MIT © [Taehwan, No](https://github.com/taehwanno)