Sign inSign up

schliflo/puppeteer-mocha-chai-docker

By schliflo

Updated about 5 years ago

Basic image for a testsuite using puppeteer, mocha and chai

Image
0

3.5K

schliflo/puppeteer-mocha-chai-docker repository overview

puppeteer-mocha-chai-docker

license Docker Automated build Docker Build Status

Basic docker image for tools and testsuites using puppeteer, mocha and chai

Usage

Run tests on your website:

# assuming you are in the directory with your tests
docker run \
    --rm \
    --tmpfs=/tmp \
    -e YARN_CACHE_FOLDER=/tmp/yarn \
    -v "$(pwd)":/validator/tests/ \
    -e URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
    -t schliflo/puppeteer-mocha-chai-docker \
    yarn test
docker-compose run \
    --rm \
    puppeteer-mocha-chai \
    env URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
    yarn test

Generate screenshots of your website:

# screenshots get saved to the current directory
docker run \
    --rm \
    --tmpfs=/tmp \
    -e YARN_CACHE_FOLDER=/tmp/yarn \
    -v "$(pwd)":/validator/screenshots/ \
    -e URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
    -t schliflo/puppeteer-mocha-chai-docker \
    yarn screenshots
docker-compose run \
    --rm \
    puppeteer-mocha-chai \
    env URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
    yarn screenshots

Tag summary

Content type

Image

Digest

Size

451.3 MB

Last updated

about 5 years ago

docker pull schliflo/puppeteer-mocha-chai-docker