davidjeddy/docker_puppeteer_jest
Docker image with Puppeteer (headless Google Chrome) and Jest test runner.
50K+
Browser testing using Chrome, no need to install stuff on your machine, it's in the image! Just make your test files and go.
Based on the article available at end-end-tests-dont-suck-puppeteer and here User Interface Testing with Jest and Puppeteer.
docker run ... --rm
executes a task then terminates.Pull Image from hub.docker.com
docker pull davidjeddy/docker_puppeteer_jest
Run the image
docker run -t -v $(pwd)/DIR/PATH/TO/YOUR/JEST/TESTS:/app/tests --name dpj --rm davidjeddy/docker_puppeteer_jest
That is it! :bacon:
You should now have test output results in the CLI output, as well as screen captures saved to $(pwd)/DIR/PATH/TO/YOUR/JEST/TESTS/_output/ .
If you get the error Async callback was not invoked withing the 5000ms timout specified by jest.setTimeout
, refer to the Jest documention for how to adjust timeout as needed.
The Google Chrome teams offers some assistance when using Puppetter over on thier GitHub project page.
docker pull davidjeddy/docker_puppeteer_jest