justinribeiro / lighthouse-mocha-example

Sample using lighthouse and lighthouse-core with Mocha to run tests on your project/site.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lighthouse-mocha-example

Using lighthouse and lighthouse-core with Mocha to run tests on your project/site.

Basic example that gathers performance metrics via Lighthouse and tests them in Mocha. Tested against Chrome headless_shell (available via my Docker container)

image

Try it out!

$ docker pull justinribeiro/chrome-headless
$ docker run -d --net host justinribeiro/chrome-headless
$ git clone git@github.com:justinribeiro/lighthouse-mocha-example.git
$ cd lighthouse-mocha-example
$ npm install
$ npm test

But I want to run this on Travis CI!

Indeed you can. See the included .travis.yml to give you a basic idea of how it works or see the screenshot below.

image

About

Sample using lighthouse and lighthouse-core with Mocha to run tests on your project/site.

License:Apache License 2.0


Languages

Language:JavaScript 100.0%