Visual regression testing using Jest, Chromeless and AWS Lambda.
Blogpost: https://novemberfive.co/blog/visual-regression-testing-jest-chromeless-lambda/
- NodeJS version 6.x or greater
- yarn
- Chrome or Chrome Canary installed (version 60 or greater)
- Clone this repository
- Run
yarn
- Build project using
yarn build
- Execute
yarn serve
(production build) oryarn start
(dev server) to serve your static site - Run
yarn test
- Execute
yarn serve
(production build) oryarn start
(dev server) to serve your static site - Run Chrome or Canary in headless mode:
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
chrome --remote-debugging-port=9222 --disable-gpu --headless
- Run
yarn test:headless
- Setup AWS Lambda following this instructions: https://github.com/graphcool/chromeless/tree/master/serverless#setup
- Create a
.env
file in the root directory:
CHROMELESS_REMOTE_URL=https://xxxxxxxxxxx.execute-api.eu-central-1.amazonaws.com/dev/
CHROMELESS_API_KEY=YOUR_AWS_API_KEY
- Run
yarn test:remote